3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $iterator1 = new \AppendIterator(); $events = new \ArrayIterator(['event']); $iterator1->append($events); // without this foreach, i will not hang foreach ($iterator2 as $event) { } $iterator1->append(new \ArrayIterator());
based on 2J8Bu
Output for 5.6.0 - 7.3.0alpha1
Notice: Undefined variable: iterator2 in /in/9O5fu on line 7 Warning: Invalid argument supplied for foreach() in /in/9O5fu on line 7