mirror of
https://github.com/php/php-src.git
synced 2026-04-17 13:01:02 +02:00
Support list() reference assignments of the form:
list(&$a, list(&$b, $c)) = $d;
RFC: https://wiki.php.net/rfc/list_reference_assignment
9 lines
193 B
PHP
9 lines
193 B
PHP
--TEST--
|
|
"Reference Unpacking - Compile Error (scalar)" list()
|
|
--FILE--
|
|
<?php
|
|
list(&$foo) = [42];
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Cannot assign reference to non referencable value in %s on line %d
|