xref: /PHP-7.2/Zend/tests/list_009.phpt (revision 4f077aee)
1--TEST--
2list with by-reference assignment should fail
3--FILE--
4<?php
5
6$a = [1];
7[&$foo] = $a;
8$foo = 2;
9
10var_dump($a);
11
12?>
13--EXPECTF--
14Fatal error: [] and list() assignments cannot be by reference in %s on line %d
15