summaryrefslogtreecommitdiff
path: root/Zend/tests/bug34873.phpt
blob: 7d9eb78ab7e4505da16c0e0736742b8364dca4d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--TEST--
Bug #34873 (Segmentation Fault on foreach in object)
--FILE--
<?php
class pwa {
	public $var;

	function __construct(){
		$this->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