3v4l.org

run code in 300+ PHP versions simultaneously
<?php $some_array = array (0 => 1, ’x’ => 1, 2 => 1, ’a’ => 1, 1 => 1, ’z’ => 1); ksort($some_array); echo(join("", array_keys($some_array)));
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Undefined constant "’x’" in /in/dBtmc:2 Stack trace: #0 {main} thrown in /in/dBtmc on line 2
Process exited with code 255.
Output for 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33
Warning: Use of undefined constant ’x’ - assumed '’x’' (this will throw an Error in a future version of PHP) in /in/dBtmc on line 2 Warning: Use of undefined constant ’a’ - assumed '’a’' (this will throw an Error in a future version of PHP) in /in/dBtmc on line 2 Warning: Use of undefined constant ’z’ - assumed '’z’' (this will throw an Error in a future version of PHP) in /in/dBtmc on line 2 0’a’’x’’z’12
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20
Notice: Use of undefined constant ’x’ - assumed '’x’' in /in/dBtmc on line 2 Notice: Use of undefined constant ’a’ - assumed '’a’' in /in/dBtmc on line 2 Notice: Use of undefined constant ’z’ - assumed '’z’' in /in/dBtmc on line 2 0’a’’x’’z’12
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.28
Notice: Use of undefined constant ’x’ - assumed '’x’' in /in/dBtmc on line 2 Notice: Use of undefined constant ’a’ - assumed '’a’' in /in/dBtmc on line 2 Notice: Use of undefined constant ’z’ - assumed '’z’' in /in/dBtmc on line 2 ’a’’z’0’x’12

preferences:
197.97 ms | 402 KiB | 225 Q