3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = 0; print_r(array_map(function ($y) use (&$x) { $x++; return $y; }, [21,42,234,2345,])); print_r($x);
based on GC5OZ
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.6
Array ( [0] => 21 [1] => 42 [2] => 234 [3] => 2345 ) 4