leetcode.nvim
leetcode.nvim copied to clipboard
PHP Parse Error (works in leetcode)
Howdy! I love this tool 🥰 Been using it for C and Python 🙌 Brushing up on PHP...
I'm getting this just sending anything into "test" for PHP
│ Line 40: PHP Parse error: syntax error, unexpected identifier "_driver", expecting "function" or "const" in solution.php
This feels like something is lost in translation on the way to the leetcode api? '_driver' feels very backend
To repro:
Pop some simple code like this in. Stdout appears in leetcode, but error appears in leetcode.nvim.
class Solution {
/**
* @param Integer[] $nums
* @param Integer $target
* @return Integer[]
*/
function twoSum($nums, $target) {
foreach ($nums as $num) {
echo $num;
}
}
}
Let me know if anything else is needed or if your experience is different!