3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array( 1=>" vahid ", 2=>" arash ", 3=>" farzam " ); foreach($a as $b){ echo "First Foreach: ". $b . "\n"; foreach($a as $c){ echo "Second Foreach: ". $c . "\n"; } }
Output for 4.3.0 - 7.1.0
First Foreach: vahid Second Foreach: vahid Second Foreach: arash Second Foreach: farzam First Foreach: arash Second Foreach: vahid Second Foreach: arash Second Foreach: farzam First Foreach: farzam Second Foreach: vahid Second Foreach: arash Second Foreach: farzam