Annotation of embedaddon/php/ext/standard/tests/array/bug30266.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #30266 (Invalid opcode 137/1/8) and array_walk
3: --FILE--
4: <?php
5: class testc
6: {
7: public $b = "c";
8:
9: function crash($val)
10: {
11: $this->b = $val;
12: throw new Exception("Error");
13: }
14: }
15:
16: $fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
17:
18: $myobj = new testc();
19:
20: function test($item2, $key, $userd)
21: {
22: $userd->crash($item2);
23: }
24:
25: try
26: {
27: array_walk($fruits, 'test', $myobj);
28: }
29: catch(Exception $e)
30: {
31: echo "Caught: " . $e->getMessage() . "\n";
32: }
33: ?>
34: ===DONE===
35: --EXPECT--
36: Caught: Error
37: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>