Open IngwiePhoenix opened 8 years ago
include_once is resolved as a regular function.
include_once
Ingwie@Ingwies-Macbook-Pro.local /tmp $ nano test.php Ingwie@Ingwies-Macbook-Pro.local /tmp $ cat test.php <?php include_once "foo.php"; Ingwie@Ingwies-Macbook-Pro.local /tmp $ uniter2ast test.php /Users/Ingwie/Work/uniter/uniter-tools/node_modules/phptoast/src/ErrorHandler.js:43 throw error; ^ Error: PHP Parse error: syntax error, unexpected '"' in (program) on line 2 Ingwie@Ingwies-Macbook-Pro.local /tmp $ nano test.php Ingwie@Ingwies-Macbook-Pro.local /tmp $ cat test.php <?php # Changed to "normal" function call: include_once("foo.php"); Ingwie@Ingwies-Macbook-Pro.local /tmp $ uniter2ast test.php { "statements": [ { "expression": { "func": { "string": "include_once", "name": "N_STRING" }, "args": [ { "string": "foo.php", "name": "N_STRING_LITERAL" } ], "name": "N_FUNCTION_CALL" }, "name": "N_EXPRESSION_STATEMENT" } ], "name": "N_PROGRAM" }
This should explain itself. :)
include_once
is resolved as a regular function.This should explain itself. :)