summaryrefslogtreecommitdiff
path: root/ext/standard/tests/array/array_map_001.phpt
blob: cd95e6c991bc02b896b7f7f330969f49cecf3962 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--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