3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function square($val) { return pow($val, 2); } $arr = array( 1, 2, 3, 4 ); $squares = array_map('square', $arr); $i = 0; foreach ($squares as $value) { if ($i++ > 0) { echo "."; } echo $value; } ?>
Output for 4.3.0 - 7.1.0
1.4.9.16