summaryrefslogtreecommitdiff
path: root/tests/lang/foreach_with_object_001.phpt
blob: 98a8f19339bb044b58e036ab4ad46f4750401eef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--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";
}

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