3v4l.org - online PHP & HHVM shell, execute code in 100+ different versions!

<?php $list = array("A","B","C","D"); foreach ( $list as $var ) { print(current($list)); } echo "\n"; foreach ( $list as $var ) { print(item($list)); } function item($list) { return current($list); } echo "\n"; item2($list); function item2($list) { foreach ( $list as $var ) { print(current($list)); } } ?>

Abusive script

This script was stopped while abusing our resources

Output for hhvm-3.0.1
Warning: unlink(/run/hhvm/hhbc.sq3): No such file or directory in Command line code on line 1 could not allocate 220200959 bytes for translation cache
Output for 5.2.4 - 5.5.12, php7@20140507 - 20140521
BBBB BCDA AAAA
Output for 4.3.0 - 4.4.0, 4.4.2 - 5.2.3
AAAA AAAA AAAA
Output for 4.4.1
BCD BCD BCD