3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ['x' => []]; array_unshift($arr['x'], 'a', 'b'); print_r($arr); $arr = ['y' => []]; array_unshift($arr['x'], 'a', 'b'); print_r($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.5.10.0070.01020.07
8.5.00.0100.01019.75
8.4.160.0170.00923.90
8.4.150.0030.00014.05
8.4.140.0100.01017.79
8.4.130.0100.01017.85
8.4.120.0130.00722.15
8.4.110.0080.01122.31
8.4.100.0110.00817.77
8.4.90.0100.01018.65
8.4.80.0090.00717.68
8.4.70.0100.00518.02
8.4.60.0070.00218.80
8.4.50.0130.00719.53
8.4.40.0100.01018.00
8.4.30.0160.00320.43
8.4.20.0030.00518.04
8.4.10.0030.00624.00
8.3.280.0120.00818.48
8.3.270.0140.00916.80
8.3.260.0130.00616.54
8.3.250.0140.00419.03
8.3.240.0100.01016.86
8.3.230.0040.00416.66
8.3.220.0020.00518.82
8.3.210.0100.00916.61
8.3.200.0070.00416.85
8.3.190.0120.00917.30
8.3.180.0040.00618.64
8.3.170.0070.01118.97
8.3.160.0120.00616.64
8.3.150.0180.00018.71
8.3.140.0060.01217.07
8.3.130.0080.00018.33
8.3.120.0090.00020.76
8.3.110.0120.00616.54
8.3.100.0090.00016.71
8.3.90.0000.00826.77
8.3.80.0080.00016.63
8.3.70.0110.01118.57
8.3.60.0140.00716.75
8.3.50.0070.00718.53
8.3.40.0100.01020.21
8.3.30.0140.00018.81
8.3.20.0000.00724.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.290.0050.00520.61
8.2.280.0070.00318.41
8.2.270.0060.01317.00
8.2.260.0140.00418.66
8.2.250.0070.00017.03
8.2.240.0030.00519.14
8.2.230.0040.00420.94
8.2.220.0030.00624.06
8.2.210.0120.00326.77
8.2.200.0000.00918.54
8.2.190.0040.01116.58
8.2.180.0110.00725.92
8.2.170.0150.00618.97
8.2.160.0040.01122.96
8.2.150.0040.00425.66
8.2.140.0090.00624.66
8.2.130.0060.00326.16
8.2.120.0040.00426.16
8.2.110.0030.00721.04
8.2.100.0060.00617.97
8.2.90.0080.00019.23
8.2.80.0080.00017.97
8.2.70.0060.00317.63
8.2.60.0090.00017.63
8.2.50.0040.00417.63
8.2.40.0000.00819.35
8.2.30.0000.00819.25
8.2.20.0040.00420.59
8.2.10.0000.00718.24
8.2.00.0070.00019.07
8.1.330.0140.00521.77
8.1.320.0130.00716.18
8.1.310.0050.00318.44
8.1.300.0000.00816.83
8.1.290.0090.00030.84
8.1.280.0100.00725.92
8.1.270.0070.00024.66
8.1.260.0030.00526.35
8.1.250.0050.00328.09
8.1.240.0030.00722.19
8.1.230.0040.00717.77
8.1.220.0080.00017.74
8.1.210.0030.00518.77
8.1.200.0060.00317.35
8.1.190.0030.00617.22
8.1.180.0040.00418.10
8.1.170.0000.00817.62
8.1.160.0000.00818.89
8.1.150.0000.00718.59
8.1.140.0000.00717.26
8.1.130.0050.00817.40
8.1.120.0040.01017.44
8.1.110.0120.00117.44
8.1.100.0100.00517.37
8.1.90.0080.00517.44
8.1.80.0090.00417.52
8.1.70.0060.00717.35
8.1.60.0110.00417.59
8.1.50.0080.00717.49
8.1.40.0090.00817.54
8.1.30.0180.00217.61
8.1.20.0120.00617.59
8.1.10.0130.00617.52
8.1.00.0140.00517.52
8.0.300.0050.00218.77
8.0.290.0000.00816.63
8.0.280.0050.00518.38
8.0.270.0040.00418.05
8.0.260.0110.00516.83
8.0.250.0080.00816.82
8.0.240.0130.00216.88
8.0.230.0100.00416.82
8.0.220.0070.00716.72
8.0.210.0090.00516.74
8.0.200.0120.00316.79
8.0.190.0110.00216.78
8.0.180.0090.00616.80
8.0.170.0120.00216.86
8.0.160.0120.00416.79
8.0.150.0120.00416.74
8.0.140.0120.00516.84
8.0.130.0090.00417.70
8.0.120.0100.00217.77
8.0.110.0090.00317.67
8.0.100.0070.00617.60
8.0.90.0070.00517.74
8.0.80.0080.00417.68
8.0.70.0100.00317.66
8.0.60.0100.00217.58
8.0.50.0090.00217.70
8.0.30.0060.00617.73
8.0.20.0060.00617.75
8.0.10.0040.00917.74

preferences:
32.53 ms | 403 KiB | 5 Q