3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array('a','b'); $t = &$array; foreach($t as $value) if ($value == 'a') $t = array_merge($t, array('c')); else echo($value); var_dump($array);

Abusive script

This script was stopped while abusing our resources

Output for 7.0.0 - 7.0.12
barray(3) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" }
Output for 5.3.0 - 5.6.26

Process exited with code 137.