Annotation of embedaddon/php/ext/standard/tests/array/array_map_001.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: array_map() and exceptions in the callback
3: --FILE--
4: <?php
5:
6: $a = array(1,2,3);
7:
8: function foo() {
9: throw new exception(1);
10: }
11:
12: try {
13: array_map("foo", $a, array(2,3));
14: } catch (Exception $e) {
15: var_dump("exception caught!");
16: }
17:
18: echo "Done\n";
19: ?>
20: --EXPECTF--
21: Warning: array_map(): An error occurred while invoking the map callback in %s on line %d
22: string(17) "exception caught!"
23: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>