3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ["aaa" => 1, "bbb" => 2, "ccc" => 3]; foreach(array_slice($arr,0,-1) as $val){ echo $val; }

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.20.0000.01619.43
8.4.10.0080.00820.37
8.3.150.0160.00317.13
8.3.140.0000.01016.78
8.3.130.0040.01516.61
8.3.120.0060.00318.91
8.3.110.0080.00020.94
8.3.100.0040.00418.58
8.3.90.0040.00426.77
8.3.80.0040.00416.50
8.3.70.0110.00416.74
8.3.60.0090.01218.30
8.3.50.0080.00617.33
8.3.40.0090.01218.70
8.3.30.0030.01318.46
8.3.20.0040.00418.89
8.3.10.0040.00421.81
8.3.00.0060.00319.52
8.2.270.0060.00316.98
8.2.260.0040.01416.41
8.2.250.0080.00018.23
8.2.240.0000.01517.08
8.2.230.0110.00022.58
8.2.220.0100.00024.06
8.2.210.0140.00426.77
8.2.200.0030.00718.16
8.2.190.0110.00718.41
8.2.180.0070.01116.63
8.2.170.0140.00022.96
8.2.160.0100.00518.91
8.2.150.0050.00024.18
8.2.140.0070.00024.66
8.2.130.0040.00419.79
8.2.120.0030.00726.35
8.2.110.0030.00621.11
8.2.100.0070.00317.72
8.2.90.0040.00417.91
8.2.80.0000.00919.06
8.2.70.0000.00817.50
8.2.60.0040.00417.63
8.2.50.0060.00317.63
8.2.40.0050.00517.62
8.2.30.0040.00419.28
8.2.20.0040.00418.11
8.2.10.0030.00418.11
8.2.00.0000.00719.48
8.1.310.0040.00418.23
8.1.300.0130.00316.50
8.1.290.0060.00330.84
8.1.280.0150.00025.92
8.1.270.0000.00823.72
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00922.02
8.1.230.0110.00020.93
8.1.220.0050.00317.74
8.1.210.0060.00318.77
8.1.200.0000.00917.23
8.1.190.0040.00417.13
8.1.180.0000.00918.10
8.1.170.0040.00417.62
8.1.160.0040.00418.98
8.1.150.0000.00718.93
8.1.140.0070.00017.69
8.1.130.0030.00319.00
8.1.120.0040.00417.48
8.1.110.0000.00817.36
8.1.100.0030.00317.44
8.1.90.0000.00817.44
8.1.80.0030.00517.34
8.1.70.0000.00717.44
8.1.60.0070.00317.63
8.1.50.0050.00217.47
8.1.40.0000.00717.50
8.1.30.0000.00817.54
8.1.20.0040.00417.55
8.1.10.0030.00517.45
8.1.00.0070.00017.33
8.0.300.0000.00720.08
8.0.290.0040.00416.75
8.0.280.0000.00718.34
8.0.270.0060.00316.77
8.0.260.0040.00417.25
8.0.250.0070.00016.96
8.0.240.0050.00216.99
8.0.230.0060.00016.95
8.0.220.0040.00416.90
8.0.210.0070.00016.77
8.0.200.0030.00316.96
8.0.190.0060.00316.99
8.0.180.0040.00416.93
8.0.170.0080.00316.92
8.0.160.0040.00416.91
8.0.150.0070.00016.86
8.0.140.0000.00716.73
8.0.130.0030.00313.30
8.0.120.0050.00216.84
8.0.110.0050.00316.76
8.0.100.0070.00016.89
8.0.90.0040.00416.75
8.0.80.0100.00716.87
8.0.70.0030.00516.88
8.0.60.0040.00416.86
8.0.50.0040.00416.69
8.0.30.0090.01017.32
8.0.20.0100.01117.40
8.0.10.0000.00816.86
8.0.00.0120.01116.80
7.4.330.0050.00015.55
7.4.320.0000.00616.46
7.4.300.0000.00716.48
7.4.290.0070.00016.57
7.4.280.0050.00216.57
7.4.270.0070.00016.51
7.4.260.0000.00616.57
7.4.250.0050.00216.51
7.4.240.0030.00316.40
7.4.230.0030.00316.69
7.4.220.0000.00716.35
7.4.210.0050.01316.51
7.4.200.0080.00016.52
7.4.160.0070.00816.50
7.4.140.0120.00817.86
7.4.130.0060.01116.51
7.4.120.0090.00916.55
7.4.110.0170.00016.36
7.4.100.0150.00916.30
7.4.90.0120.01216.51
7.4.80.0100.01319.39
7.4.70.0130.00316.47
7.4.60.0060.01016.42
7.4.50.0030.01216.52
7.4.40.0090.00916.44
7.4.00.0030.01014.84
7.3.330.0050.00013.05
7.3.320.0000.00613.24
7.3.310.0060.00016.30
7.3.300.0060.00016.24
7.3.290.0000.00716.09
7.3.280.0060.01116.25
7.3.260.0080.00916.33
7.3.240.0080.00916.47
7.3.230.0060.01616.59
7.3.210.0040.01216.32
7.3.200.0140.00916.32
7.3.190.0110.00616.42
7.3.180.0100.01016.22
7.3.170.0150.00016.34
7.3.160.0040.01216.51
7.3.70.0070.00314.65
7.3.60.0120.00614.80
7.3.50.0030.01314.72
7.3.40.0060.00914.61
7.3.30.0070.01014.89
7.3.20.0150.00014.84
7.3.10.0040.01314.86
7.3.00.0160.00614.93
7.2.330.0070.01016.66
7.2.320.0110.00716.66
7.2.310.0200.00316.61
7.2.300.0120.00616.60
7.2.290.0110.01116.52
7.2.200.0090.00914.88
7.2.190.0080.00314.82
7.2.180.0040.01515.03
7.2.170.0070.01114.81
7.2.160.0110.00314.93
7.2.150.0130.00015.22
7.2.140.0120.00614.88
7.2.130.0060.00914.86
7.2.120.0110.01115.17
7.2.110.0060.00615.08
7.2.100.0100.00614.73
7.2.90.0060.01015.00
7.2.80.0090.00315.18
7.2.70.0160.00414.96
7.2.60.0080.00915.83
7.2.50.0080.00815.23
7.2.40.0900.00816.46
7.2.30.0770.00816.50
7.2.20.0760.01016.52
7.2.10.0870.00816.57
7.2.00.0760.00716.46
7.1.300.0030.00914.05
7.1.290.0120.00813.97
7.1.280.0030.00914.01
7.1.270.0110.00313.87
7.1.260.0100.00313.80
7.1.250.0130.00613.96
7.1.240.0200.00313.63
7.1.230.0130.01013.94
7.1.220.0180.00313.91
7.1.210.0230.00414.05
7.1.200.0100.00714.88
7.1.190.0140.00914.10
7.1.180.0730.00313.95
7.1.170.0150.01113.97
7.1.160.0870.00815.22
7.1.150.1000.01015.46
7.1.140.0710.00815.21
7.1.130.0800.01015.37
7.1.120.0840.01315.47
7.1.110.0860.00615.01
7.1.100.0780.00614.81
7.1.90.0850.00815.09
7.1.80.0810.00815.12
7.1.70.0770.00714.62
7.1.60.1050.00723.46
7.1.50.0870.01023.49
7.1.40.0940.00923.00
7.1.30.0930.01123.31
7.1.20.0920.01423.30
7.1.10.0840.00614.26
7.1.00.1440.00914.35
7.0.330.0190.00613.26
7.0.320.0110.01113.29
7.0.310.0180.00713.61
7.0.300.0120.00913.62
7.0.290.0160.00613.29
7.0.280.0210.00813.38
7.0.270.0140.01413.30
7.0.260.0210.00413.46
7.0.250.0170.01113.50
7.0.240.0180.00613.42
7.0.230.0160.00313.63
7.0.220.0120.00613.34
7.0.210.0180.00613.75
7.0.200.0190.00613.44
7.0.190.0210.00313.51
7.0.180.0120.01213.50
7.0.170.0130.01013.73
7.0.160.0130.00813.47
7.0.150.0110.00813.57
7.0.140.0140.01113.39
7.0.130.0160.01113.70
7.0.120.0150.01013.44
7.0.110.0130.00513.72
7.0.100.0090.00913.59
7.0.90.0130.01113.55
7.0.80.0180.00513.43
7.0.70.0190.00013.52
7.0.60.0200.00713.64
7.0.50.0260.00013.55
7.0.40.0130.01013.66
7.0.30.0440.00613.72
7.0.20.0150.00413.71
7.0.10.0140.00813.75
7.0.00.0130.01013.69
5.6.400.0070.01514.23
5.6.390.0170.00314.42
5.6.380.0120.01214.45
5.6.370.0150.00714.47
5.6.360.0070.01014.51
5.6.350.0130.00314.18
5.6.340.0190.00014.49
5.6.330.0130.00814.42
5.6.320.0000.01814.41
5.6.310.0060.00914.18
5.6.300.0170.02917.50
5.6.290.0170.02917.63
5.6.280.0140.03217.42
5.6.270.0170.02917.50
5.6.260.0110.03217.52
5.6.250.0130.03117.46
5.6.240.0110.03517.36
5.6.230.0170.02917.46
5.6.220.0140.03117.48
5.6.210.0130.03017.69
5.6.200.0140.03317.42
5.6.190.0180.03917.53
5.6.180.0150.03517.49
5.6.170.0160.03017.51
5.6.160.0160.02817.43
5.6.150.0110.03517.50
5.6.140.0130.03417.67
5.6.130.0140.03117.50
5.6.120.0160.03117.45
5.6.110.0120.03417.46
5.6.100.0120.03317.56
5.6.90.0170.02817.58
5.6.80.0170.02617.14
5.6.70.0130.03217.13
5.6.60.0130.03317.15
5.6.50.0130.02817.14
5.6.40.0120.03017.17
5.6.30.0130.03017.15
5.6.20.0180.02817.05
5.6.10.0130.03217.13
5.6.00.0210.02917.15
5.5.380.0100.01014.13
5.5.370.0070.00714.35
5.5.360.0160.00514.27
5.5.350.0160.00514.18
5.5.340.0130.00614.43
5.5.330.0130.00613.99
5.5.320.0140.00614.35
5.5.310.0140.00614.45
5.5.300.0090.01214.41
5.5.290.0170.00913.89
5.5.280.0160.00413.87
5.5.270.0120.00914.10
5.5.260.0100.01014.05
5.5.250.0110.01114.33
5.5.240.0090.01114.14
5.5.230.0160.00514.10
5.5.220.0120.01214.40
5.5.210.0090.00914.37
5.5.200.0110.00714.13
5.5.190.0230.00014.12
5.5.180.0070.01014.00
5.5.170.0110.00813.97
5.5.160.0150.00614.05
5.5.150.0120.00614.05
5.5.140.0150.00513.94
5.5.130.0090.00914.34
5.5.120.0200.00014.32
5.5.110.0110.00714.32
5.5.100.0130.00813.83
5.5.90.0160.00314.28
5.5.80.0110.01114.27
5.5.70.0150.00014.10
5.5.60.0090.00913.97
5.5.50.0110.01113.98
5.5.40.0170.00713.99
5.5.30.0150.00513.97
5.5.20.0140.00814.25
5.5.10.0140.00614.13
5.5.00.0210.00014.20
5.4.450.0160.00011.34
5.4.440.0090.00511.34
5.4.430.0040.00811.34
5.4.420.0090.00711.34
5.4.410.0080.00511.34
5.4.400.0000.01111.34
5.4.390.0140.00311.34
5.4.380.0070.00711.34
5.4.370.0000.01211.34
5.4.360.0100.00511.34
5.4.350.0050.01011.34
5.4.340.0170.00311.34
5.4.330.0120.00311.34
5.4.320.0110.00311.34
5.4.310.0140.00211.34
5.4.300.0070.00411.34
5.4.290.0140.00011.34
5.4.280.0050.00811.34
5.4.270.0090.00611.34
5.4.260.0100.00611.34
5.4.250.0130.00011.34
5.4.240.0090.00211.34
5.4.230.0080.00511.34
5.4.220.0070.00411.34
5.4.210.0090.00511.34
5.4.200.0130.00311.34
5.4.190.0080.00611.34
5.4.180.0110.00611.34
5.4.170.0050.00811.34
5.4.160.0090.00411.34
5.4.150.0110.00311.34
5.4.140.0060.00611.34
5.4.130.0060.00911.34
5.4.120.0130.00011.34
5.4.110.0060.00611.34
5.4.100.0090.00311.34
5.4.90.0130.00511.34
5.4.80.0100.00311.34
5.4.70.0090.00411.34
5.4.60.0070.00711.34
5.4.50.0190.00011.34
5.4.40.0090.00611.34
5.4.30.0100.00611.34
5.4.20.0080.00811.34
5.4.10.0110.00011.34
5.4.00.0110.00011.34
5.3.290.0070.00411.34
5.3.280.0100.00711.34
5.3.270.0060.00811.34
5.3.260.0040.01211.34
5.3.250.0140.00011.34
5.3.240.0070.00611.34
5.3.230.0100.00311.34
5.3.220.0090.00211.34
5.3.210.0080.00411.34
5.3.200.0140.00511.34
5.3.190.0000.01211.34
5.3.180.0080.00411.34
5.3.170.0120.00011.34
5.3.160.0070.00511.34
5.3.150.0110.00311.34
5.3.140.0110.00311.34
5.3.130.0090.00511.34
5.3.120.0100.00011.34
5.3.110.0140.00311.34
5.3.100.0100.00011.34
5.3.90.0130.00011.34
5.3.80.0100.00311.34
5.3.70.0060.00611.34
5.3.60.0100.00011.34
5.3.50.0120.00011.34
5.3.40.0070.00411.34
5.3.30.0060.00311.34
5.3.20.0050.00911.34
5.3.10.0050.00911.34
5.3.00.0120.00411.34
5.2.170.0110.00411.34
5.2.160.0060.00611.34
5.2.150.0040.00711.34
5.2.140.0090.00011.34
5.2.130.0120.00211.34
5.2.120.0080.00511.34
5.2.110.0120.00011.34
5.2.100.0060.00611.34
5.2.90.0030.00811.34
5.2.80.0080.00311.34
5.2.70.0070.00411.34
5.2.60.0070.00211.34
5.2.50.0060.00311.34
5.2.40.0000.00811.34
5.2.30.0040.00411.34
5.2.20.0120.00011.34
5.2.10.0100.00011.34
5.2.00.0060.00611.34
5.1.60.0060.00311.34
5.1.50.0000.00711.34
5.1.40.0070.00311.34
5.1.30.0060.00311.34
5.1.20.0080.00411.34
5.1.10.0050.00511.34
5.1.00.0050.00511.34
5.0.50.0040.00411.34
5.0.40.0090.00011.34
5.0.30.0050.00311.34
5.0.20.0040.00411.34
5.0.10.0070.00211.34
5.0.00.0050.00211.34
4.4.90.0000.00611.34
4.4.80.0000.00711.34
4.4.70.0030.00311.34
4.4.60.0060.00011.34
4.4.50.0000.00611.34
4.4.40.0000.00611.34
4.4.30.0030.00311.34
4.4.20.0030.00311.34
4.4.10.0070.00011.34
4.4.00.0040.00411.34
4.3.110.0090.00011.34
4.3.100.0040.00411.34
4.3.90.0000.00711.34
4.3.80.0040.00011.34
4.3.70.0050.00011.34
4.3.60.0050.00011.34
4.3.50.0000.00911.34
4.3.40.0050.00311.34
4.3.30.0030.00111.34
4.3.20.0000.00411.34
4.3.10.0050.00011.34
4.3.00.0030.00611.34

preferences:
31.49 ms | 403 KiB | 5 Q