3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = array("red", "green", "blue", "yellow", "1", "2", "3","4"); array_splice($input, -1, 1, array("black", "maroon")); #array_splice($input, 1, -3); print_r($input);

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.60.0110.00418.30
8.3.50.0070.00921.97
8.3.40.0070.00718.64
8.3.30.0100.00718.84
8.3.20.0040.00420.20
8.3.10.0000.00821.78
8.3.00.0040.00417.79
8.2.180.0170.00316.38
8.2.170.0030.01022.96
8.2.160.0000.01320.39
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0040.00421.16
8.2.110.0060.00319.27
8.2.100.0040.00817.84
8.2.90.0090.00019.13
8.2.80.0060.00317.97
8.2.70.0040.00417.38
8.2.60.0050.00319.52
8.2.50.0060.00318.10
8.2.40.0040.00420.45
8.2.30.0030.00519.23
8.2.20.0040.00417.67
8.2.10.0040.00417.89
8.2.00.0000.00717.54
8.1.280.0040.01125.92
8.1.270.0030.00623.80
8.1.260.0030.00526.35
8.1.250.0070.00028.09
8.1.240.0090.00019.05
8.1.230.0070.00317.70
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0070.00817.00
8.1.180.0000.00718.10
8.1.170.0000.00818.66
8.1.160.0030.00518.73
8.1.150.0040.00419.98
8.1.140.0040.00417.36
8.1.130.0040.00417.82
8.1.120.0030.00317.30
8.1.110.0070.00017.34
8.1.100.0030.00517.45
8.1.90.0000.00717.44
8.1.80.0030.00317.32
8.1.70.0030.00317.36
8.1.60.0030.00617.41
8.1.50.0030.00617.52
8.1.40.0080.00017.46
8.1.30.0050.00317.56
8.1.20.0030.00517.52
8.1.10.0090.00017.52
8.1.00.0000.00717.44
8.0.300.0000.00718.77
8.0.290.0080.00016.58
8.0.280.0050.00218.38
8.0.270.0000.00717.18
8.0.260.0000.00817.23
8.0.250.0000.00716.78
8.0.240.0030.00316.78
8.0.230.0040.00416.81
8.0.220.0030.00316.77
8.0.210.0030.00316.80
8.0.200.0000.00716.76
8.0.190.0040.00416.86
8.0.180.0000.00716.79
8.0.170.0040.00416.87
8.0.160.0080.00016.87
8.0.150.0120.00016.74
8.0.140.0000.00716.73
8.0.130.0000.00613.20
8.0.120.0000.00816.79
8.0.110.0040.00416.88
8.0.100.0070.00016.69
8.0.90.0050.00216.63
8.0.80.0100.00516.78
8.0.70.0030.00316.73
8.0.60.0070.00016.79
8.0.50.0000.00816.76
8.0.30.0100.01017.02
8.0.20.0060.01417.40
8.0.10.0000.00716.73
8.0.00.0070.01116.62
7.4.330.0070.00015.00
7.4.320.0030.00316.48
7.4.300.0060.00016.55
7.4.290.0070.00016.52
7.4.280.0070.00016.40
7.4.270.0000.00716.55
7.4.260.0040.00416.41
7.4.250.0000.00816.48
7.4.240.0030.00316.42
7.4.230.0070.00016.62
7.4.220.0130.01316.34
7.4.210.0080.00716.55
7.4.200.0050.00216.32
7.4.160.0180.00316.38
7.4.150.0070.01117.40
7.4.140.0090.00817.86
7.4.130.0080.01316.33
7.4.120.0070.00916.39
7.4.110.0120.00416.41
7.4.100.0120.00616.37
7.4.90.0090.00716.52
7.4.80.0160.00619.39
7.4.70.0080.00816.32
7.4.60.0100.00716.34
7.4.50.0000.00816.34
7.4.40.0070.01416.48
7.4.30.0170.00016.37
7.4.00.0040.01414.61
7.3.330.0030.00313.04
7.3.320.0050.00012.87
7.3.310.0030.00316.00
7.3.300.0000.00716.16
7.3.290.0090.00616.12
7.3.280.0070.01016.11
7.3.270.0100.00717.40
7.3.260.0100.00916.15
7.3.240.0110.00716.11
7.3.230.0130.00416.39
7.3.210.0090.00916.41
7.3.200.0060.00919.39
7.3.190.0030.01416.36
7.3.180.0160.00316.08
7.3.170.0090.01016.27
7.3.160.0030.01516.16
7.3.120.0030.00914.38
7.3.110.0000.01314.59
7.3.100.0030.00914.61
7.3.90.0040.01114.90
7.3.80.0000.01114.80
7.3.70.0000.01214.64
7.3.60.0060.00814.72
7.3.50.0030.00914.89
7.3.40.0040.00414.57
7.3.30.0030.01014.74
7.3.20.0070.00716.61
7.3.10.0090.00616.64
7.3.00.0060.00616.52
7.2.330.0100.00716.55
7.2.320.0030.01316.32
7.2.310.0060.01016.44
7.2.300.0100.00616.52
7.2.290.0100.00716.63
7.2.240.0060.00914.90
7.2.230.0110.00414.96
7.2.220.0030.01414.82
7.2.210.0040.01115.03
7.2.200.0030.01014.59
7.2.190.0040.01114.70
7.2.180.0030.01014.98
7.2.170.0090.00614.86
7.2.160.0120.00414.95
7.2.150.0040.00716.91
7.2.140.0090.00616.61
7.2.130.0030.01016.74
7.2.120.0030.01016.59
7.2.110.0110.00816.59
7.2.100.0000.01416.71
7.2.90.0030.00916.85
7.2.80.0110.00416.71
7.2.70.0040.01416.61
7.2.60.0030.01216.78
7.2.50.0030.01416.77
7.2.40.0000.00916.80
7.2.30.0100.00316.74
7.2.20.0000.01316.72
7.2.10.0060.01016.73
7.2.00.0040.01017.87
7.1.330.0060.00915.50
7.1.320.0090.00615.82
7.1.310.0040.00715.53
7.1.300.0060.00615.85
7.1.290.0000.01515.71
7.1.280.0000.01315.84
7.1.270.0030.01215.70
7.1.260.0070.00715.88
7.1.250.0040.01115.56
7.1.200.0070.00715.84
7.1.100.0040.00817.99
7.1.70.0030.01317.21
7.1.60.0070.01819.25
7.1.50.0070.01416.86
7.1.00.0000.08022.30
7.0.200.0050.00316.64
7.0.140.0000.07321.92
7.0.60.0170.06319.99
7.0.50.0130.07017.87
7.0.40.0030.04720.18
7.0.30.0270.08320.11
7.0.20.0200.08320.33
7.0.10.0100.08720.33
7.0.00.0070.05020.23
5.6.280.0070.06720.98
5.6.210.0030.04020.60
5.6.200.0000.04318.23
5.6.190.0130.04720.41
5.6.180.0230.08020.39
5.6.170.0300.07320.45
5.6.160.0170.06020.50
5.6.150.0070.07018.28
5.6.140.0000.05318.21
5.6.130.0100.07318.24
5.6.120.0030.06021.01
5.6.110.0030.08021.00
5.6.100.0100.08021.10
5.6.90.0000.05020.98
5.6.80.0170.07320.49
5.5.350.0200.07320.32
5.5.340.0070.04717.95
5.5.330.0070.04320.27
5.5.320.0170.04020.19
5.5.310.0370.07320.30
5.5.300.0030.03717.91
5.5.290.0000.05717.98
5.5.280.0070.08320.95
5.5.270.0100.07720.97
5.5.260.0000.05320.73
5.5.250.0170.04720.61
5.5.240.0000.08020.34
5.4.450.0070.03319.20
5.4.440.0130.04319.41
5.4.430.0100.04719.16
5.4.420.0200.03019.54
5.4.410.0070.03719.36
5.4.400.0100.04019.24
5.4.390.0170.02719.15
5.4.380.0500.04718.80
5.4.370.0400.05018.68
5.4.360.0470.07018.76
5.4.350.0500.04718.59
5.4.340.0430.07718.84
5.4.320.0070.03712.48
5.4.310.0080.03812.48
5.4.300.0090.04712.48
5.4.290.0090.04512.48
5.4.280.0070.03712.38
5.4.270.0060.03712.38
5.4.260.0080.03612.38
5.4.250.0040.04012.38
5.4.240.0070.03612.38
5.4.230.0080.03612.37
5.4.220.0080.03512.37
5.4.210.0050.04512.37
5.4.200.0060.04112.37
5.4.190.0040.03812.36
5.4.180.0070.04012.36
5.4.170.0090.04612.38
5.4.160.0120.04412.38
5.4.150.0070.03912.37
5.4.140.0070.03712.05
5.4.130.0100.03312.04
5.4.120.0060.03712.00
5.4.110.0050.03712.00
5.4.100.0080.03512.00
5.4.90.0090.03611.99
5.4.80.0070.03811.99
5.4.70.0060.03611.99
5.4.60.0040.03711.98
5.4.50.0040.03711.99
5.4.40.0070.03411.98
5.4.30.0030.03911.97
5.4.20.0080.03311.97
5.4.10.0050.03511.98
5.4.00.0080.03711.46
5.3.290.0080.03812.80
5.3.280.0070.04112.71
5.3.270.0060.04012.72
5.3.260.0060.04012.72
5.3.250.0050.04012.72
5.3.240.0080.03712.72
5.3.230.0080.03712.71
5.3.220.0060.03812.68
5.3.210.0050.04012.68
5.3.200.0090.03412.68
5.3.190.0070.03712.68
5.3.180.0070.04112.68
5.3.170.0040.03812.67
5.3.160.0080.03512.67
5.3.150.0070.03612.67
5.3.140.0070.04212.66
5.3.130.0050.04012.66
5.3.120.0060.03912.66
5.3.110.0110.04012.66
5.3.100.0100.03612.11
5.3.90.0090.03312.09
5.3.80.0050.03812.08
5.3.70.0080.03512.08
5.3.60.0060.03812.06
5.3.50.0070.03712.01
5.3.40.0050.03912.01
5.3.30.0050.03811.97
5.3.20.0060.03611.75
5.3.10.0080.03411.71
5.3.00.0060.03611.70
5.2.170.0080.0309.20
5.2.160.0050.0309.20
5.2.150.0050.0319.20
5.2.140.0050.0319.20
5.2.130.0060.0299.16
5.2.120.0030.0329.16
5.2.110.0040.0319.17
5.2.100.0030.0319.16
5.2.90.0050.0399.16
5.2.80.0080.0299.16
5.2.70.0090.0269.16
5.2.60.0050.0299.12
5.2.50.0060.0289.08
5.2.40.0070.0279.06
5.2.30.0080.0409.04
5.2.20.0050.0309.03
5.2.10.0060.0288.94
5.2.00.0110.0358.79
5.1.60.0040.0258.06
5.1.50.0030.0278.06
5.1.40.0060.0278.04
5.1.30.0060.0248.39
5.1.20.0040.0278.41
5.1.10.0050.0258.13
5.1.00.0070.0248.14
5.0.50.0070.0256.61
5.0.40.0040.0206.47
5.0.30.0050.0356.29
5.0.20.0050.0236.26
5.0.10.0030.0226.24
5.0.00.0030.0326.22
4.4.90.0010.0174.78
4.4.80.0050.0144.76
4.4.70.0020.0174.75
4.4.60.0030.0164.76
4.4.50.0030.0164.77
4.4.40.0050.0274.70
4.4.30.0020.0194.75
4.4.20.0010.0174.84
4.4.10.0030.0154.85
4.4.00.0020.0264.76
4.3.110.0030.0154.67
4.3.100.0040.0134.67
4.3.90.0050.0134.63
4.3.80.0000.0284.58
4.3.70.0020.0154.63
4.3.60.0030.0144.63
4.3.50.0040.0144.63
4.3.40.0030.0244.53
4.3.30.0000.0183.28
4.3.20.0000.0183.25
4.3.10.0020.0163.22
4.3.00.0030.01015.27

preferences:
54.12 ms | 401 KiB | 5 Q