3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cars = [ [ 'Volvo', 22, 28 ], // index 0 [ 'BMW', 15, 13 ], // index 1 [ 'Land Rover', 3, 8 ], // index 2 [ 'Add Cars', 'X', 'Y' ] // index i ]; $i = count($cars) -1; // get current last set in the array unset($cars[0]); // unset Volvo unset($cars[1]); // unset BMW unset($cars[$i]); // unset index # the only index not unset is 2 (Land Rover) so it should only be left inside the array print_r($cars);

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.140.0120.00917.28
8.4.130.0100.00817.77
8.4.120.0110.00822.47
8.4.110.0050.00422.38
8.4.100.0110.00917.57
8.4.90.0110.00922.54
8.4.80.0060.00219.39
8.4.70.0070.00217.88
8.4.60.0120.00518.45
8.4.50.0040.00417.73
8.4.40.0090.00917.82
8.4.30.0030.00619.50
8.4.20.0160.00320.70
8.4.10.0090.00019.56
8.3.270.0130.00816.70
8.3.260.0120.00816.80
8.3.250.0100.00818.77
8.3.240.0070.00116.68
8.3.230.0050.00416.57
8.3.220.0140.00418.99
8.3.210.0080.00718.40
8.3.200.0050.00416.65
8.3.190.0090.00917.16
8.3.180.0100.00816.79
8.3.170.0100.01016.71
8.3.160.0130.00018.69
8.3.150.0110.00716.97
8.3.140.0090.00918.66
8.3.130.0000.00818.42
8.3.120.0040.01218.90
8.3.110.0050.00320.94
8.3.100.0070.01124.06
8.3.90.0040.01126.77
8.3.80.0090.00018.31
8.3.70.0140.00716.88
8.3.60.0140.00318.55
8.3.50.0160.00522.05
8.3.40.0120.00318.56
8.3.30.0100.01018.50
8.3.20.0150.00019.02
8.3.10.0000.00721.73
8.3.00.0040.00420.77
8.2.290.0080.01020.40
8.2.280.0050.00318.25
8.2.270.0110.00716.51
8.2.260.0040.01118.90
8.2.250.0080.00018.58
8.2.240.0140.00417.29
8.2.230.0000.00722.58
8.2.220.0060.00337.54
8.2.210.0140.00026.77
8.2.200.0030.01016.63
8.2.190.0100.01316.58
8.2.180.0110.01125.92
8.2.170.0210.00022.96
8.2.160.0100.00320.13
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0080.00026.16
8.2.120.0040.00420.95
8.2.110.0000.01022.06
8.2.100.0070.00817.68
8.2.90.0040.00419.28
8.2.80.0080.00017.97
8.2.70.0090.00317.62
8.2.60.0060.00317.68
8.2.50.0000.00818.07
8.2.40.0030.00618.28
8.2.30.0000.00718.16
8.2.20.0070.00018.16
8.2.10.0050.00318.11
8.2.00.0000.00717.73
8.1.330.0050.01121.90
8.1.320.0110.00916.31
8.1.310.0110.00416.55
8.1.300.0060.01218.37
8.1.290.0100.00330.84
8.1.280.0100.00725.92
8.1.270.0060.00322.23
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00019.27
8.1.230.0000.01119.16
8.1.220.0040.00417.79
8.1.210.0050.00318.77
8.1.200.0000.00817.35
8.1.190.0040.00417.00
8.1.180.0000.00818.10
8.1.170.0060.00318.50
8.1.160.0000.00718.88
8.1.150.0000.00720.14
8.1.140.0070.00019.44
8.1.130.0000.00717.65
8.1.120.0040.00417.43
8.1.110.0040.00417.38
8.1.100.0030.00617.45
8.1.90.0000.00817.45
8.1.80.0000.00717.50
8.1.70.0090.00017.46
8.1.60.0060.00317.57
8.1.50.0040.00417.40
8.1.40.0080.00017.46
8.1.30.0060.00317.51
8.1.20.0040.00417.61
8.1.10.0000.00717.40
8.1.00.0020.00517.43
8.0.300.0070.00021.47
8.0.290.0070.00016.63
8.0.280.0000.01018.36
8.0.270.0060.00317.17
8.0.260.0000.00617.15
8.0.250.0040.00416.87
8.0.240.0070.00016.93
8.0.230.0000.00616.84
8.0.220.0030.00316.88
8.0.210.0070.00016.85
8.0.200.0000.00716.77
8.0.190.0030.00616.79
8.0.180.0050.00216.85
8.0.170.0000.00816.91
8.0.160.0050.00316.92
8.0.150.0030.00616.79
8.0.140.0000.00916.84
8.0.130.0030.00313.35
8.0.120.0000.00816.84
8.0.110.0020.00516.91
8.0.100.0000.00816.71
8.0.90.0040.00416.80
8.0.80.0090.00916.77
8.0.70.0000.00716.77
8.0.60.0000.00816.70
8.0.50.0000.00716.99
8.0.30.0090.00717.05
8.0.20.0080.01717.40
8.0.10.0040.00416.83
8.0.00.0090.00916.71
7.4.330.0050.00015.55
7.4.320.0040.00416.58
7.4.300.0070.00016.41
7.4.290.0000.00916.53
7.4.280.0090.00016.64
7.4.270.0060.00016.54
7.4.260.0030.00316.57
7.4.250.0080.00016.35
7.4.240.0040.00416.48
7.4.230.0030.00316.59
7.4.220.0070.01116.36
7.4.210.0110.00916.51
7.4.200.0030.00316.48
7.4.160.0100.00616.60
7.4.150.0100.00717.40
7.4.140.0080.01117.86
7.4.130.0090.00816.43
7.4.120.0070.01016.43
7.4.110.0100.00716.54
7.4.100.0100.01016.52
7.4.90.0130.00316.52
7.4.80.0130.01019.39
7.4.70.0060.01116.54
7.4.60.0080.00816.43
7.4.50.0100.00616.71
7.4.40.0070.00716.48
7.4.30.0050.01316.53
7.4.00.0000.01415.14
7.3.330.0060.00013.16
7.3.320.0000.00513.16
7.3.310.0030.00316.07
7.3.300.0000.00716.28
7.3.290.0070.00716.28
7.3.280.0060.01516.24
7.3.270.0110.00817.40
7.3.260.0110.00716.27
7.3.250.0070.01016.28
7.3.240.0050.01416.32
7.3.230.0030.01416.39
7.3.210.0140.00316.40
7.3.200.0100.01016.23
7.3.190.0090.01216.30
7.3.180.0180.00616.46
7.3.170.0100.00716.30
7.3.160.0110.00816.21
7.3.00.0150.00016.43
7.2.330.0090.00916.73
7.2.320.0110.01116.55
7.2.310.0070.01716.67
7.2.300.0080.01116.37
7.2.290.0100.00716.67
7.2.130.0060.00616.63
7.2.120.0040.01116.82
7.2.110.0040.01116.71
7.2.100.0070.00316.73
7.2.90.0070.00416.85
7.2.80.0100.01016.29
7.2.70.0070.01016.82
7.2.60.0100.00716.86
7.2.50.0130.00316.77
7.2.40.0100.00016.82
7.2.30.0070.00716.52
7.2.20.0070.00316.57
7.2.10.0070.01016.85
7.2.00.0070.00718.07
7.1.250.0110.00615.68
7.1.240.0090.00015.61
7.1.230.0030.01315.65
7.1.220.0110.00715.43
7.1.210.0090.00615.63
7.1.200.0090.01115.80
7.1.190.0000.01915.64
7.1.180.0030.01315.72
7.1.170.0070.00715.80
7.1.160.0080.00315.81
7.1.150.0080.00015.65
7.1.140.0040.00815.68
7.1.130.0120.00315.70
7.1.120.0030.00715.77
7.1.110.0040.00715.73
7.1.100.0050.00716.76
7.1.90.0030.00815.65
7.1.80.0040.00715.36
7.1.70.0050.00716.48
7.1.60.0090.00316.49
7.1.50.0090.00615.41
7.1.40.0040.00815.75
7.1.30.0090.00315.69
7.1.20.0000.01215.68
7.1.10.0040.00715.29
7.1.00.0070.04018.96
7.0.330.0060.01015.27
7.0.320.0090.00015.30
7.0.310.0100.00715.47
7.0.300.0050.00815.26
7.0.290.0030.00815.31
7.0.280.0040.00415.23
7.0.270.0050.00515.33
7.0.260.0040.00415.50
7.0.250.0070.00715.36
7.0.240.0130.00015.41
7.0.230.0100.01015.55
7.0.220.0040.01115.36
7.0.210.0030.01215.16
7.0.200.0070.00915.06
7.0.190.0000.01015.43
7.0.180.0070.01015.35
7.0.170.0040.00815.38
7.0.160.0000.01515.32
7.0.150.0040.00815.25
7.0.140.0030.01015.27
7.0.130.0070.03218.69
7.0.120.0070.03018.84
7.0.110.0080.03118.67
7.0.100.0090.03518.46
7.0.90.0040.03918.82
7.0.80.0100.02718.55
7.0.70.0040.03718.73
7.0.60.0070.03218.58
7.0.50.0080.02718.79
7.0.40.0110.03117.75
7.0.30.0050.03217.70
7.0.20.0090.02817.72
7.0.10.0030.03317.69
7.0.00.0050.03017.79
5.6.380.0120.00313.88
5.6.370.0080.00614.09
5.6.360.0130.00014.53
5.6.350.0030.00714.33
5.6.340.0070.00714.21
5.6.330.0060.00614.07
5.6.320.0040.01113.82
5.6.310.0030.00714.46
5.6.300.0110.00414.21
5.6.290.0040.01114.04
5.6.280.0050.03417.57
5.6.270.0050.03117.54
5.6.260.0070.03217.49
5.6.250.0090.03017.66
5.6.240.0050.04117.52
5.6.230.0090.03617.61
5.6.220.0050.03517.70
5.6.210.0090.03317.64
5.6.200.0100.03217.46
5.6.190.0070.03717.46
5.6.180.0050.03517.55
5.6.170.0070.03217.74
5.6.160.0080.03217.44
5.6.150.0050.03517.67
5.6.140.0080.03117.61
5.6.130.0060.03117.62
5.6.120.0100.03817.61
5.6.110.0030.03517.37
5.6.100.0090.03417.52
5.6.90.0030.03117.44
5.6.80.0080.03017.29
5.6.70.0050.03217.37
5.6.60.0090.04017.15
5.6.50.0030.03517.08
5.6.40.0040.03517.28
5.6.30.0090.03817.12
5.6.20.0000.04117.27
5.6.10.0110.02917.29
5.6.00.0130.02617.33

preferences:
31.16 ms | 403 KiB | 5 Q