3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 3 => 2, 2 => 1, 1 => NULL, 4 => NULL, ); uasort($array, function ($a, $b) { if ($a === $b) { return 0; } elseif ($a === NULL) { return 1; } elseif ($b === NULL) { return -1; } return ($a < $b) ? -1 : 1; }) var_dump($array);
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16, 7.0.0
Parse error: syntax error, unexpected 'var_dump' (T_STRING) in /in/lZjMY on line 24
Process exited with code 255.

preferences:
174.47 ms | 1395 KiB | 24 Q