3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php array_walk(range('a', 'z'), function($letter) use (&$zones) { $zones["Zone $letter"] = "Zone $letter"; }, $zones ); print_r($zones);
based on SfvUI
Output for 7.0.0 - 7.3.0alpha1
Notice: Only variables should be passed by reference in /in/bEmc7 on line 3 Array ( [Zone a] => Zone a [Zone b] => Zone b [Zone c] => Zone c [Zone d] => Zone d [Zone e] => Zone e [Zone f] => Zone f [Zone g] => Zone g [Zone h] => Zone h [Zone i] => Zone i [Zone j] => Zone j [Zone k] => Zone k [Zone l] => Zone l [Zone m] => Zone m [Zone n] => Zone n [Zone o] => Zone o [Zone p] => Zone p [Zone q] => Zone q [Zone r] => Zone r [Zone s] => Zone s [Zone t] => Zone t [Zone u] => Zone u [Zone v] => Zone v [Zone w] => Zone w [Zone x] => Zone x [Zone y] => Zone y [Zone z] => Zone z )
Output for 5.3.0 - 5.6.21
Strict Standards: Only variables should be passed by reference in /in/bEmc7 on line 3 Array ( [Zone a] => Zone a [Zone b] => Zone b [Zone c] => Zone c [Zone d] => Zone d [Zone e] => Zone e [Zone f] => Zone f [Zone g] => Zone g [Zone h] => Zone h [Zone i] => Zone i [Zone j] => Zone j [Zone k] => Zone k [Zone l] => Zone l [Zone m] => Zone m [Zone n] => Zone n [Zone o] => Zone o [Zone p] => Zone p [Zone q] => Zone q [Zone r] => Zone r [Zone s] => Zone s [Zone t] => Zone t [Zone u] => Zone u [Zone v] => Zone v [Zone w] => Zone w [Zone x] => Zone x [Zone y] => Zone y [Zone z] => Zone z )
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/bEmc7 on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION in /in/bEmc7 on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/bEmc7 on line 4
Process exited with code 255.