uniter
uniter copied to clipboard
include_once: Not resolved
include_once
is resolved as a regular function.
[email protected] /tmp $ nano test.php
[email protected] /tmp $ cat test.php
<?php
include_once "foo.php";
[email protected] /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
[email protected] /tmp $ nano test.php
[email protected] /tmp $ cat test.php
<?php
# Changed to "normal" function call:
include_once("foo.php");
[email protected] /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. :)