3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ['monkey' => 1, 'giraffe' => 2, 'lion' => 3, 'walrus' => 4, 'zebra' => 5, 'narwhal' => 6]; $arr += array_splice($arr, array_search('giraffe', array_keys($arr)), 1); var_export($arr);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.70.0150.00616.50
8.3.60.0110.00318.43
8.3.50.0000.01618.27
8.3.40.0110.00620.34
8.3.30.0100.01318.70
8.3.20.0050.00324.18
8.3.10.0080.00024.66
8.3.00.0080.00026.16
8.2.190.0030.01416.58
8.2.180.0070.00716.32
8.2.170.0150.00018.65
8.2.160.0060.01022.96
8.2.150.0000.00725.66
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0080.00026.16
8.2.110.0080.00920.06
8.2.100.0180.00518.61
8.2.90.0200.00718.44
8.2.80.0170.00818.62
8.2.70.0210.00618.29
8.2.60.0170.00518.50
8.2.50.0150.00519.11
8.2.40.0130.00518.51
8.2.30.0130.00318.46
8.2.20.0120.00518.90
8.2.10.0100.00718.57
8.2.00.0110.00618.53
8.1.280.0140.00725.92
8.1.270.0040.00422.24
8.1.260.0070.00426.35
8.1.250.0070.00028.09
8.1.240.0100.00618.84
8.1.230.0110.00619.23
8.1.220.0140.00618.22
8.1.210.0110.00519.19
8.1.200.0140.00518.08
8.1.190.0160.00318.04
8.1.180.0120.00418.34
8.1.170.0120.00318.42
8.1.160.0100.00618.54
8.1.150.0130.00319.13
8.1.140.0110.00518.16
8.1.130.0110.00518.15
8.1.120.0140.00218.21
8.1.110.0120.00418.78
8.1.100.0130.00418.24
8.1.90.0150.00318.24
8.1.80.0130.00518.25
8.1.70.0130.00418.25
8.1.60.0150.00518.20
8.1.50.0150.00518.20
8.1.40.0150.00318.31
8.1.30.0130.00418.49
8.1.20.0140.00418.31
8.1.10.0110.00518.35
8.1.00.0150.00318.33
8.0.300.0130.00418.24
8.0.290.0130.00417.71
8.0.280.0100.00818.54
8.0.270.0130.00517.73
8.0.260.0110.00517.97
8.0.250.0150.00417.71
8.0.240.0140.00417.74
8.0.230.0110.00617.91
8.0.220.0150.00417.67
8.0.210.0130.00717.67
8.0.200.0110.00717.75
8.0.190.0110.00617.92
8.0.180.0150.00317.71
8.0.170.0170.00217.75
8.0.160.0140.00417.67
8.0.150.0160.00417.69
8.0.140.0150.00417.75
8.0.130.0120.00417.86
8.0.120.0150.00417.67
8.0.110.0130.00217.92
8.0.100.0120.00617.71
8.0.90.0140.00417.65
8.0.80.0150.00417.61
8.0.70.0130.00417.69
8.0.60.0080.00717.90
8.0.50.0110.00517.67
8.0.30.0090.00617.93
8.0.20.0120.00417.86
8.0.10.0130.00217.80
5.4.00.0100.00725.92

preferences:
17.38 ms | 401 KiB | 5 Q