From: Antony Dovgal Date: Fri, 14 Oct 2005 21:52:18 +0000 (+0000) Subject: MFH: add test for bug #34873 X-Git-Tag: php-5.1.0RC3~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c042299e69bb5e9ac986513ed726864407d65d9;p=php MFH: add test for bug #34873 --- diff --git a/Zend/tests/bug34873.phpt b/Zend/tests/bug34873.phpt new file mode 100644 index 0000000000..d8683c991f --- /dev/null +++ b/Zend/tests/bug34873.phpt @@ -0,0 +1,27 @@ +--TEST-- +bug #34873 (Segmentation Fault on foreach in object) +--FILE-- +var = array(); + } + + function test (){ + $cont = array(); + $cont["mykey"] = "myvalue"; + + foreach ($cont as $this->var['key'] => $this->var['value']) + var_dump($this->var['value']); + } +} +$myPwa = new Pwa(); +$myPwa->test(); + +echo "Done\n"; +?> +--EXPECT-- +string(7) "myvalue" +Done