3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ "Alfa" => ["Temp", "Zeta"], "Teta" => ["Zeta", "Temp"], "Zeta" => ["Temp"], "Temp" => [], ]; asort($array); uasort ($array, function ($a, $b) { return in_array(key($a), $b); } print_r($array);
Output for 7.0.0 - 7.0.9
Parse error: syntax error, unexpected 'print_r' (T_STRING), expecting ',' or ')' in /in/o7UrT on line 16
Process exited with code 255.
Output for 5.6.0 - 5.6.24
Parse error: syntax error, unexpected 'print_r' (T_STRING) in /in/o7UrT on line 16
Process exited with code 255.

preferences:
176.76 ms | 1395 KiB | 42 Q