1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/Zend/tests/list/destruct_object_not_ArrayAccess.phpt

18 lines
319 B
PHP

--TEST--
Destructuring with list() a value of type object (that does not implement ArrayAccess)
--FILE--
<?php
$v = new stdClass();
list($a, $b) = $v;
var_dump($a, $b);
?>
--EXPECTF--
Fatal error: Uncaught Error: Cannot use object of type stdClass as array in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d