3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = [ "2179454040" => "127.0.0.1:6379", "2159827012" => "127.0.0.1:6380", "2171050562" => "127.0.0.1:6380", "2153052555" => "127.0.0.1:6381", "2171236323" => "127.0.0.1:6381", "2162841922" => "127.0.0.1:6381", "2173346807" => "127.0.0.1:6382", "2171411418" => "127.0.0.1:6382", "2151534559" => "127.0.0.1:6382" ] for ($i = 0; $i < count($arr1); $i++) { ksort(arr1[$i], SORT_NUMERIC); } var_dump($arr1);
Output for 5.4.0 - 5.4.25
Parse error: syntax error, unexpected 'for' (T_FOR) in /in/PPaYU on line 16
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected '[' in /in/PPaYU on line 4
Process exited with code 255.

preferences:
187.26 ms | 1395 KiB | 62 Q