mirror of
https://github.com/php/php-src.git
synced 2025-08-17 22:48:57 +02:00

Remove extra, unnecessary warning when the callback fails for array_map, array_reduce and array_filter
22 lines
306 B
PHP
22 lines
306 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";
|
|
?>
|
|
--EXPECTF--
|
|
string(17) "exception caught!"
|
|
Done
|