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.4.120.0050.00822.36
8.4.110.0050.00420.52
8.4.100.0120.00817.52
8.4.90.0110.00920.71
8.4.80.0070.01020.48
8.4.70.0130.00618.71
8.4.60.0080.01320.42
8.4.50.0040.00420.16
8.4.40.0090.00920.39
8.4.30.0160.00318.59
8.4.20.0100.01019.77
8.4.10.0120.00821.98
8.3.250.0120.00718.99
8.3.240.0110.00616.74
8.3.230.0140.00516.68
8.3.220.0070.01120.92
8.3.210.0070.00618.52
8.3.200.0040.00416.50
8.3.190.0090.01018.93
8.3.180.0120.00718.75
8.3.170.0150.00417.00
8.3.160.0060.01316.53
8.3.150.0030.00516.45
8.3.140.0110.00718.58
8.3.130.0080.00016.36
8.3.120.0160.00318.95
8.3.110.0050.00520.94
8.3.100.0100.00616.41
8.3.90.0070.00716.38
8.3.80.0030.00618.43
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.290.0100.00817.20
8.2.280.0120.00518.45
8.2.270.0040.01116.38
8.2.260.0040.00416.96
8.2.250.0090.00016.47
8.2.240.0110.00717.30
8.2.230.0000.00822.58
8.2.220.0000.00924.06
8.2.210.0040.01126.77
8.2.200.0090.00316.38
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.330.0100.00921.99
8.1.320.0010.00723.82
8.1.310.0140.00016.54
8.1.300.0090.00016.03
8.1.290.0030.00618.88
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:
31.47 ms | 403 KiB | 5 Q