Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dollar sign problem with anonymous objects in php 7 #7230

Closed
ciscoheat opened this issue Jun 28, 2018 · 0 comments
Closed

Dollar sign problem with anonymous objects in php 7 #7230

ciscoheat opened this issue Jun 28, 2018 · 0 comments
Assignees
Labels
platform-php Everything related to PHP

Comments

@ciscoheat
Copy link
Contributor

ciscoheat commented Jun 28, 2018

Running this on 4.0.0-preview4:

class Test {
    static function main() {
        var data = {"$id": 123};
        trace(Reflect.field(data, "$id"));
    }
}

Compile with haxe --php bin -main Test, and then when executing:

PHP Fatal error:  Uncaught ErrorException: Undefined variable: id in E:\Temp\bin\lib\Test.php:16
Stack trace:
#0 E:\Temp\bin\lib\Test.php(16): php\Boot::php\{closure}(8, 'Undefined varia...', 'E:\\Temp\\bin\\lib...', 16, Array)
#1 E:\Temp\bin\index.php(14): Test::main()
#2 {main}
  thrown in E:\Temp\bin\lib\Test.php on line 16
@RealyUniqueName RealyUniqueName self-assigned this Jun 28, 2018
@RealyUniqueName RealyUniqueName added the platform-php Everything related to PHP label Jun 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform-php Everything related to PHP
Projects
None yet
Development

No branches or pull requests

2 participants