-
Notifications
You must be signed in to change notification settings - Fork 71
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
impossible detect curly in encapsed
#175
Comments
👍 I'll fix it soon |
Looks due this problem we break code: $var = "This is my array value: $anArray[key]";
$var = "This is my array value: {$anArray[key]}"; Output: $var = "This is my array value: $anArray[key]";
$var = "This is my array value: $anArray[key]"; Second expression output (with PHP Warning: Use of undefined constant key - assumed 'key' |
I look on https://github.com/nikic/PHP-Parser/, they don't have information about Example. Input:
AST: {
"kind": "encapsed",
},
"value": [
{
"kind": "encapseditem",
"curly" : "true",
"expression": {
"kind": "variable",
"name": "var",
"byref": false,
"curly": false
}
}
],
"type": "string"
} Input:
AST: {
"kind": "encapsed",
},
"value": [
{
"kind": "encapseditem",
"curly" : "false",
"expression": {
"kind": "variable",
"name": "var",
"byref": false,
"curly": false
}
}
],
"type": "string"
} Input:
AST: {
"kind": "encapsed",
},
"value": [
{
"kind": "encapseditem",
"curly" : "false",
"expression": {
"kind": "variable",
"name": "var",
"byref": false,
"curly": true
}
}
],
"type": "string"
} |
Input:
Impossible detect
${
and}
for first example. Maybe we can add optionssyntax
:The text was updated successfully, but these errors were encountered: