php-src/ext/standard/tests/array/array_map_001.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

22 lines
305 B
PHP

--TEST--
array_map() and exceptions in the callback
--FILE--
<?php
$a = array(1,2,3);
function foo() {
throw new exception(1);
}
try {
array_map("foo", $a, array(2,3));
} catch (Exception $e) {
var_dump("exception caught!");
}
echo "Done\n";
?>
--EXPECT--
string(17) "exception caught!"
Done