xref: /PHP-8.0/Zend/tests/list_007.phpt (revision e97d5fab)
1--TEST--
2Using lambda with list()
3--FILE--
4<?php
5
6list($x, $y) = function() { };
7
8var_dump($x, $y);
9
10?>
11--EXPECTF--
12Fatal error: Uncaught Error: Cannot use object of type Closure as array in %slist_007.php:3
13Stack trace:
14#0 {main}
15  thrown in %slist_007.php on line 3
16