summaryrefslogtreecommitdiff
path: root/Zend/tests/bug34467.phpt
blob: fa1d8de2cdba86c2fdc15536c780b361964e1775 (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 #34467 (foreach + __get + __set incosistency)
--FILE--
<?php
class abc {
	private $arr;

	function __set ($key, $value) {
    $this->arr[$key] = $value;
  }

	function __get ($key) {
	  return $this->arr[$key];
	}
}
$abc = new abc();
foreach (array (1,2,3) as $abc->k => $abc->v) {
	var_dump($abc->k,$abc->v);
}
?>
--EXPECT--
int(0)
int(1)
int(1)
int(2)
int(2)
int(3)