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
Code like:
<?php ( $a ? $b : $c ) ? $d : $e;
Is parsed correctly:
array( 0: Stmt_Expression( expr: Expr_Ternary( cond: Expr_Ternary( cond: Expr_Variable( name: a ) if: Expr_Variable( name: b ) else: Expr_Variable( name: c ) ) if: Expr_Variable( name: d ) else: Expr_Variable( name: e ) ) ) )
But PrettyPrinter will outputs:
PrettyPrinter
<?php $a ? $b : $c ? $d : $e;
So if you run the code it will gives:
Deprecated: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
The text was updated successfully, but these errors were encountered:
php-parser issue 718.zip
composer update php index.php
Sorry, something went wrong.
eff72ee
Successfully merging a pull request may close this issue.
Code like:
Is parsed correctly:
But
PrettyPrinter
will outputs:So if you run the code it will gives:
The text was updated successfully, but these errors were encountered: