3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = new ArrayObject(); for( $i=0; $i<100; $i++ ){ $a->$i = $i*100; } foreach($obj->getIterator() as $i){ echo $i; }
based on Gv2MA
Output for 7.0.5 - 7.2.0
Notice: Undefined variable: obj in /in/kvGLn on line 6 Fatal error: Uncaught Error: Call to a member function getIterator() on null in /in/kvGLn:6 Stack trace: #0 {main} thrown in /in/kvGLn on line 6
Process exited with code 255.
Output for 7.0.0 - 7.0.4
Notice: Undefined variable: obj in /in/kvGLn on line 6 Fatal error: Uncaught Error: Call to a member function getIterator() on unknown in /in/kvGLn:6 Stack trace: #0 {main} thrown in /in/kvGLn on line 6
Process exited with code 255.
Output for 5.6.8 - 5.6.28
Notice: Undefined variable: obj in /in/kvGLn on line 6 Fatal error: Call to a member function getIterator() on null in /in/kvGLn on line 6
Process exited with code 255.
Output for 5.3.18 - 5.5.35
Notice: Undefined variable: obj in /in/kvGLn on line 6 Fatal error: Call to a member function getIterator() on a non-object in /in/kvGLn on line 6
Process exited with code 255.