We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The exponentiation arithmetic operator in PHP is **, and only exists since PHP 5.6 The ^ operator is only the bitwise XOR operator.
**
^
See: http://php.net/manual/en/language.operators.arithmetic.php http://php.net/manual/en/language.operators.bitwise.php
The wrong code is here: https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Tokenizers/PHP.php#L1307
case '^': $newToken['type'] = 'T_POWER'; break;
I'm not familiar enough with PHP_CodeSniffer's code yet, so I cannot make a PR now, but I'm sure that this is a tokenizer bug.
The text was updated successfully, but these errors were encountered:
I'm pretty sure that's always been like that, and I have no idea why. Thanks for picking it up.
Sorry, something went wrong.
Fixed tokenizing of the XOR operator, which was incorrectly identifie…
6a1e8be
…d as a power operator (bug #765)
Thanks for the fix, great work! :)
No branches or pull requests
The exponentiation arithmetic operator in PHP is
**
, and only exists since PHP 5.6The
^
operator is only the bitwise XOR operator.See:
http://php.net/manual/en/language.operators.arithmetic.php
http://php.net/manual/en/language.operators.bitwise.php
The wrong code is here: https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Tokenizers/PHP.php#L1307
I'm not familiar enough with PHP_CodeSniffer's code yet, so I cannot make a PR now, but I'm sure that this is a tokenizer bug.
The text was updated successfully, but these errors were encountered: