Annotation of embedaddon/php/Zend/tests/bug34873.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #34873 (Segmentation Fault on foreach in object)
3: --FILE--
4: <?php
5: class pwa {
6: public $var;
7:
8: function __construct(){
9: $this->var = array();
10: }
11:
12: function test (){
13: $cont = array();
14: $cont["mykey"] = "myvalue";
15:
16: foreach ($cont as $this->var['key'] => $this->var['value'])
17: var_dump($this->var['value']);
18: }
19: }
20: $myPwa = new Pwa();
21: $myPwa->test();
22:
23: echo "Done\n";
24: ?>
25: --EXPECT--
26: string(7) "myvalue"
27: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>