We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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 following code:
<?php $index = 1; function getList() { return [2, 3]; } $a = [$index => list($x, $y) = getList()]; print_r($a);
Resulted in this output:
PHP Fatal error: Cannot use list() as standalone expression in test.php on line 6
But I expected this output instead:
Array ( [1] => Array ( [0] => 2 [1] => 3 ) )
This syntax is correct since PHP 5.4 up to 8.2.
Timeframe: it started to fail yesterday in PHP CS Fixer CI:
8.3.0-dev
No response
The text was updated successfully, but these errors were encountered:
This regressed in commit 1c733c8 /cc @iluuu1994
Sorry, something went wrong.
Fix list() assignment in array literals
7f3ebaa
Fixes phpGH-11320
Revert "Use zend_ast_apply in zend_eval_const_expr (php#11261)"
0f43b28
This reverts commit 1c733c8. Fixes phpGH-11320
Revert "Use zend_ast_apply in zend_eval_const_expr (#11261)"
fbe6696
This reverts commit 1c733c8. Fixes GH-11320
iluuu1994
Successfully merging a pull request may close this issue.
Description
The following code:
Resulted in this output:
But I expected this output instead:
This syntax is correct since PHP 5.4 up to 8.2.
Timeframe: it started to fail yesterday in PHP CS Fixer CI:
PHP Version
8.3.0-dev
Operating System
No response
The text was updated successfully, but these errors were encountered: