3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = [ 1 => "abc", 3 => "xyz"]; $r = array_map(function($x) {return strtouppper($x);}, $a); print_r($r);
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function strtouppper() in /in/LSLYB:4 Stack trace: #0 [internal function]: {closure}('abc') #1 /in/LSLYB(4): array_map(Object(Closure), Array) #2 {main} thrown in /in/LSLYB on line 4
Process exited with code 255.
Output for 5.4.10 - 5.6.28
Fatal error: Call to undefined function strtouppper() in /in/LSLYB on line 4
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/LSLYB on line 3
Process exited with code 255.