1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 18:53:33 +02:00
Files
archived-php-src/Zend/tests/bug31720.phpt
T
2019-03-11 11:32:20 +01:00

18 lines
454 B
PHP

--TEST--
Bug #31720 (Invalid object callbacks not caught in array_walk())
--FILE--
<?php
$array = array('at least one element');
try {
array_walk($array, array($nonesuchvar,'show'));
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
?>
===DONE===
--EXPECTF--
Notice: Undefined variable: nonesuchvar in %s on line %d
array_walk() expects parameter 2 to be a valid callback, first array member is not a valid class name or object
===DONE===