Annotation of embedaddon/php/ext/spl/tests/bug54323.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: Bug #54323 (Accessing unset()'ed ArrayObject's property causes crash)
3: --FILE--
4: <?php
5: class C {
6: public $prop = 'C::prop.orig';
7: }
8: class MyArrayObject extends ArrayObject {
9: }
10: $c = new C;
11: $ao = new MyArrayObject($c);
12: testAccess($c, $ao);
13: function testAccess($c, $ao) {
14: foreach ($ao as $key=>$value) {
15: }
16: unset($ao['prop']);
17: var_dump($c->prop, $ao['prop']);
18: }
19: --EXPECTF--
20: Notice: Undefined property: C::$prop in %sbug54323.php on line 14
21:
1.1.1.2 ! misho 22: Notice: Undefined index: prop in %sbug54323.php on line 14
1.1 misho 23: NULL
24: NULL
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>