summaryrefslogtreecommitdiff
path: root/tests/lang/foreach_with_object_001.phpt
blob: 598b844fb732f1a40cc727411b1728a6700dfff3 (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
--TEST--
foreach() with foreach($o->mthd()->arr)
--FILE--
<?php
class Test {
   public $a = array(1,2,3,4,5); // removed, crash too
   function c() {
      return new Test();
   }

}
$obj = new Test();
foreach ($obj->c()->a as $value) {
    print "$value\n";
}

?>
===DONE===
--EXPECT--
1
2
3
4
5
===DONE===