You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stdlib: token_get_all() null byte after $ — T_VARIABLE not literal dollar + T_BAD_CHARACTER (ext/tokenizer/tokenizer.c) #13896
For source <?php $\0 = 1;, token_get_all() must lex the bytes after <?php as a literal'$' token followed by T_BAD_CHARACTER for the embedded NUL. This compiler’s VM returns T_VARIABLE with value '$' plus T_BAD_CHARACTER, diverging from Zend’s token stream.
Downstream tools that diff token streams against php-src (static analysis, highlight pipelines) see a false variable name.
Activity
PurHur commentedon Jun 30, 2026
claim: PHP Compiler STD Lib — batch (issues #13896, #4710)
Fix token_get_all() bare $ before NUL — literal dollar not T_VARIABLE (…
PurHur commentedon Jun 30, 2026
Merged via #13908.
token_get_all('<?php $\0 = 1;')now matches Zend: literal'$'+T_BAD_CHARACTER. Verified VM + AOT lint + unit tests.