summaryrefslogtreecommitdiff
path: root/Zend/tests/bug34873.phpt
blob: d8683c991f1458818be20abba9875eec294746de (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