-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Shorthand binary cast causes tokenizer errors #371
Comments
Can you please post the PHP code that - when scanned - triggers the notices, e.g., in a GitHub Gist? |
This then hangs without generating further output. |
This also then hangs. |
The |
Even more minimal test cases:
|
I hadn't seen binary casting before either. Looks like PHP doesn't assign a specific token to it, so I might need to detect it in some way. Thanks for posting this code. |
The fix that went in now tokenizes this code: <?php
if (foo($a, b"
$c
")) {}
b"$c";
if (b"$c") {} like this:
Note the new T_BINARY_CAST tokens in there. Thanks again for submitting that code. |
The fix you checked in solves the problem for me. Thank you! |
My codebase passed phpcs 1.5.6 cleanly. When I run phpcs.phar 2.0.0 on it, I get "Undefined index: parenthesis_closer" and "Undefined index:" errors on a large number of files. Here's one iteration of the two errors; this block of errors repeats hundreds of times.
The text was updated successfully, but these errors were encountered: