3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $order = array('ACO', 'ZCO', 'Other'); function compare($a, $b) use ($order) { $ai = array_search($a, $order); $bi = array_search($b, $order); return $a<$b ? -1 : $a>$b; } $a = array('ZCO'=>1, 'Other'=>1, 'ACO'=>1); uksort($a, "compare"); print_r($a);
Output for 5.4.0 - 5.4.27
Parse error: syntax error, unexpected 'use' (T_USE), expecting '{' in /in/AsRaV on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_USE, expecting '{' in /in/AsRaV on line 5
Process exited with code 255.