tartrazine/spec/tests/php/variable_variable.txt

46 lines
1006 B
Plaintext

---input---
<?php
${'whatever'} = '';
${$whatever} = '';
${${'whatever' . 'whatever'}} = '';
---tokens---
'<?php' Comment.Preproc
'\n' Text
'${' Name.Variable
"'whatever'" Literal.String.Single
'}' Name.Variable
' ' Text
'=' Operator
' ' Text
"''" Literal.String.Single
';' Punctuation
'\n' Text
'${' Name.Variable
'$whatever' Name.Variable
'}' Name.Variable
' ' Text
'=' Operator
' ' Text
"''" Literal.String.Single
';' Punctuation
'\n' Text
'${' Name.Variable
'${' Name.Variable
"'whatever'" Literal.String.Single
' ' Text
'.' Operator
' ' Text
"'whatever'" Literal.String.Single
'}' Name.Variable
'}' Name.Variable
' ' Text
'=' Operator
' ' Text
"''" Literal.String.Single
';' Punctuation
'\n' Text