Skip to content

PHP Parse Error (works in leetcode)Β #163

Open
@aaharr

Description

@aaharr

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions