3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [3, 1, 2]; $b = [4, 5, 6]; usort($a, function() { usort($b, function() { return 0; }); return 1; });
Output for 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught TypeError: usort(): Argument #1 ($array) must be of type array, null given in /in/VTDGb:7 Stack trace: #0 /in/VTDGb(7): usort(NULL, Object(Closure)) #1 [internal function]: {closure}(3, 1) #2 /in/VTDGb(6): usort(Array, Object(Closure)) #3 {main} thrown in /in/VTDGb on line 7
Process exited with code 255.
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28
Fatal error: Uncaught TypeError: usort(): Argument #1 ($array) must be of type array, null given in /in/VTDGb:9 Stack trace: #0 /in/VTDGb(9): usort(NULL, Object(Closure)) #1 [internal function]: {closure}(3, 1) #2 /in/VTDGb(12): usort(Array, Object(Closure)) #3 {main} thrown in /in/VTDGb on line 9
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Warning: usort() expects parameter 1 to be array, null given in /in/VTDGb on line 9 Warning: usort() expects parameter 1 to be array, null given in /in/VTDGb on line 9 Warning: usort() expects parameter 1 to be array, null given in /in/VTDGb on line 9
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
Warning: usort() expects parameter 1 to be array, null given in /in/VTDGb on line 9 Warning: usort() expects parameter 1 to be array, null given in /in/VTDGb on line 9

preferences:
157.49 ms | 402 KiB | 198 Q