3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo "\nPopping elements off an unreferenced array.\n"; $a = array("original.1","original.2","original.3"); foreach ($a as $v) { array_pop($a); var_dump($v); } var_dump($a);
Output for 5.2.13 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Popping elements off an unreferenced array. string(10) "original.1" string(10) "original.2" string(10) "original.3" array(0) { }