3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tokens = array(); $conditions = array(); for ($i = 0; $i <= 10; $i++) { $tokens[$i] = $conditions; // First integer must be less than 8 // and second must be 8, 9 or 10 if ($i !== 0 && $i !== 8) { continue; } // Add condition and then pop off straight away. // Can also use array_shift() here. $conditions[$i] = true; $oldCondition = array_pop($conditions); } // Conditions should be empty. print_r($conditions);

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.0090.00616.50
8.3.50.0160.00721.27
8.3.40.0110.00418.60
8.3.30.0130.00719.18
8.3.20.0050.00220.16
8.3.10.0080.00023.68
8.3.00.0070.00719.11
8.2.180.0070.00718.54
8.2.170.0120.00319.08
8.2.160.0070.00722.96
8.2.150.0060.00325.66
8.2.140.0030.00524.66
8.2.130.0000.00826.16
8.2.120.0040.00421.05
8.2.110.0050.00519.27
8.2.100.0090.00317.84
8.2.90.0050.00317.88
8.2.80.0090.00018.95
8.2.70.0000.00817.63
8.2.60.0000.00917.93
8.2.50.0000.00818.07
8.2.40.0000.00918.29
8.2.30.0000.00718.13
8.2.20.0040.00417.70
8.2.10.0040.00417.96
8.2.00.0000.00818.16
8.1.280.0110.01125.92
8.1.270.0050.00323.99
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0030.00724.03
8.1.230.0060.00618.98
8.1.220.0050.00317.78
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0080.00017.23
8.1.180.0040.00418.10
8.1.170.0040.00418.91
8.1.160.0000.00718.85
8.1.150.0040.00418.92
8.1.140.0000.00717.36
8.1.130.0060.00317.74
8.1.120.0040.00417.48
8.1.110.0070.00017.35
8.1.100.0050.00217.33
8.1.90.0030.00517.46
8.1.80.0040.00317.43
8.1.70.0000.00717.33
8.1.60.0060.00317.46
8.1.50.0030.00517.55
8.1.40.0000.00817.41
8.1.30.0040.00417.56
8.1.20.0040.00417.61
8.1.10.0040.00417.59
8.1.00.0050.00217.52
8.0.300.0060.00318.77
8.0.290.0000.00716.63
8.0.280.0040.00418.33
8.0.270.0030.00317.16
8.0.260.0030.00317.17
8.0.250.0000.00716.94
8.0.240.0070.00016.97
8.0.230.0070.00017.01
8.0.220.0050.00216.95
8.0.210.0040.00416.76
8.0.200.0040.00416.93
8.0.190.0040.00416.97
8.0.180.0040.00416.95
8.0.170.0050.00316.92
8.0.160.0000.00716.88
8.0.150.0040.00416.93
8.0.140.0080.00016.89
8.0.130.0050.00213.38
8.0.120.0000.00816.82
8.0.110.0000.00716.93
8.0.100.0040.00416.75
8.0.90.0080.00016.85
8.0.80.0120.00316.95
8.0.70.0040.00416.92
8.0.60.0000.00716.72
8.0.50.0040.00416.76
8.0.30.0090.00717.14
8.0.20.0110.01017.40
8.0.10.0000.00716.82
8.0.00.0090.00816.83
7.4.330.0000.00515.03
7.4.320.0000.00716.37
7.4.300.0030.00316.61
7.4.290.0040.00416.49
7.4.280.0000.00716.45
7.4.270.0000.00616.61
7.4.260.0030.00316.51
7.4.250.0000.00716.45
7.4.240.0030.00316.62
7.4.230.0030.00416.60
7.4.220.0120.00616.60
7.4.210.0100.00416.64
7.4.200.0000.00716.71
7.4.160.0130.00516.63
7.4.150.0090.00917.40
7.4.140.0100.00917.86
7.4.130.0110.00716.55
7.4.120.0080.01116.61
7.4.110.0130.01016.56
7.4.100.0060.01216.49
7.4.90.0080.00816.43
7.4.80.0000.01719.39
7.4.70.0180.00316.45
7.4.60.0040.01516.39
7.4.50.0000.00816.24
7.4.40.0100.00716.45
7.4.30.0030.01416.55
7.4.00.0030.01014.62
7.3.330.0000.00613.13
7.3.320.0100.00313.08
7.3.310.0070.00016.27
7.3.300.0040.00416.32
7.3.290.0080.00616.39
7.3.280.0080.00916.36
7.3.270.0080.01117.40
7.3.260.0150.01316.57
7.3.250.0100.00916.41
7.3.240.0030.01416.38
7.3.230.0110.00616.39
7.3.210.0110.00516.40
7.3.200.0100.00719.39
7.3.190.0120.00616.64
7.3.180.0040.01116.18
7.3.170.0150.00416.36
7.3.160.0100.00716.39
7.2.330.0080.00916.70
7.2.320.0060.01316.57
7.2.310.0170.00016.74
7.2.300.0170.00016.68
7.2.290.0160.00616.57
7.2.60.0030.01016.88
7.1.200.0090.00315.63
7.1.70.0030.01317.13
7.1.60.0000.01417.29
7.1.50.0100.01017.14
7.1.00.0070.07322.48
7.0.200.0000.00816.63
7.0.100.0130.03319.96
7.0.90.0100.03719.97
7.0.80.0000.04319.94
7.0.70.0000.04319.98
7.0.60.0100.03320.07
7.0.50.0030.04720.30
7.0.40.0100.04720.07
7.0.30.0100.06320.02
7.0.20.0000.08719.95
7.0.10.0000.04320.06
7.0.00.0100.06720.13
5.6.250.0000.04720.62
5.6.240.0000.04720.63
5.6.230.0000.04720.75
5.6.220.0030.04720.53
5.6.210.0070.04020.43
5.6.200.0000.04721.00
5.6.190.0000.05021.02
5.6.180.0000.06721.16
5.6.170.0070.08021.03
5.6.160.0100.04021.00
5.6.150.0000.08721.05
5.6.140.0070.08021.12
5.6.130.0100.07720.93
5.6.120.0070.05721.15
5.6.110.0070.08721.11
5.6.100.0100.08320.90
5.6.90.0070.08320.91
5.6.80.0130.06020.42
5.6.70.0100.07720.31
5.6.60.0070.06020.29
5.6.50.0070.07020.46
5.6.40.0030.04020.51
5.6.30.0070.04320.33
5.6.20.0170.06720.37
5.6.10.0100.05720.35
5.6.00.0100.07720.28
5.5.380.0000.04320.34
5.5.370.0030.04020.37
5.5.360.0030.04020.53
5.5.350.0030.04020.42
5.5.340.0100.03720.87
5.5.330.0000.04720.86
5.5.320.0070.03720.86
5.5.310.0030.05320.89
5.5.300.0170.06320.92
5.5.290.0030.07720.88
5.5.280.0130.05320.91
5.5.270.0100.04720.85
5.5.260.0070.04720.85
5.5.250.0100.07320.68
5.5.240.0070.07320.16
5.5.230.0030.08020.09
5.5.220.0100.07720.00
5.5.210.0170.07020.09
5.5.200.0200.06020.22
5.5.190.0030.07020.11
5.5.180.0130.07020.09
5.5.160.0030.05020.25
5.5.150.0100.06320.09
5.5.140.0130.06020.25
5.5.130.0130.03720.13
5.5.120.0130.07320.21
5.5.110.0100.06020.21
5.5.100.0100.05319.95
5.5.90.0030.07019.99
5.5.80.0030.04719.99
5.5.70.0000.08319.95
5.5.60.0100.07719.94
5.5.50.0070.03320.03
5.5.40.0070.07020.03
5.5.30.0070.06720.12
5.5.20.0030.07320.07
5.5.10.0100.08020.01
5.5.00.0100.07020.00
5.4.450.0100.07719.30
5.4.440.0070.05019.39
5.4.430.0070.08019.38
5.4.420.0070.07319.36
5.4.410.0100.04019.24
5.4.400.0130.07319.03
5.4.390.0000.07719.12
5.4.380.0230.05719.11
5.4.370.0000.06718.90
5.4.360.0030.07318.81
5.4.350.0100.08719.11
5.4.340.0070.08018.78
5.4.320.0030.07019.07
5.4.310.0030.04019.14
5.4.300.0170.07018.80
5.4.290.0070.08319.02
5.4.280.0100.05319.05
5.4.270.0030.07719.22
5.4.260.0070.06018.80
5.4.250.0270.06318.94
5.4.240.0070.07319.12
5.4.230.0070.06719.07
5.4.220.0100.07318.93
5.4.210.0070.08018.75
5.4.200.0030.07718.97
5.4.190.0100.05018.77
5.4.180.0070.08018.95
5.4.170.0070.06018.82
5.4.160.0130.04719.09
5.4.150.0030.05718.92
5.4.140.0070.07016.34
5.4.130.0030.04316.23
5.4.120.0100.05716.21
5.4.110.0070.08016.45
5.4.100.0000.04016.42
5.4.90.0100.07016.43
5.4.80.0100.06716.25
5.4.70.0130.06016.19
5.4.60.0130.04316.18
5.4.50.0000.07316.28
5.4.40.0130.07016.33
5.4.30.0030.04316.22
5.4.20.0030.04016.41
5.4.10.0070.03316.27
5.4.00.0230.03015.72
5.3.290.0070.07714.50
5.3.280.0000.07714.50
5.3.270.0030.06714.59
5.3.260.0070.07714.55
5.3.250.0100.07314.47
5.3.240.0100.06314.51
5.3.230.0100.06714.61
5.3.220.0100.04714.44
5.3.210.0170.06714.54
5.3.200.0070.07014.42
5.3.190.0130.07014.50
5.3.180.0100.06714.52
5.3.170.0000.04714.50
5.3.160.0100.04314.54
5.3.150.0070.03314.52
5.3.140.0100.06014.55
5.3.130.0070.08014.36
5.3.120.0030.04714.40
5.3.110.0030.07314.52
5.3.100.0070.06713.97
5.3.90.0130.06713.98
5.3.80.0070.06013.77
5.3.70.0030.03713.77
5.3.60.0130.03313.77
5.3.50.0100.07013.70
5.3.40.0130.05713.71
5.3.30.0070.04713.92
5.3.20.0070.07013.64
5.3.10.0070.06013.60
5.3.00.0030.03713.40
5.2.170.0030.07011.14
5.2.160.0000.03711.13
5.2.150.0070.03011.16
5.2.140.0030.05311.14
5.2.130.0030.05311.05
5.2.120.0030.03310.91
5.2.110.0030.04011.05
5.2.100.0030.05311.09
5.2.90.0030.05711.06
5.2.80.0030.06311.05
5.2.70.0000.04310.96
5.2.60.0070.06011.07
5.2.50.0030.03011.08
5.2.40.0000.06010.98
5.2.30.0100.03710.97
5.2.20.0000.03710.98
5.2.10.0100.05710.88
5.2.00.0100.05710.63
5.1.60.0000.05710.02
5.1.50.0070.0539.83
5.1.40.0070.0479.96
5.1.30.0030.06010.34
5.1.20.0100.05010.39
5.1.10.0030.05010.09
5.1.00.0030.0509.95
5.0.50.0030.0438.53
5.0.40.0070.0338.43
5.0.30.0000.0678.43
5.0.20.0000.0278.43
5.0.10.0000.0408.43
5.0.00.0030.0508.43
4.4.90.0030.0338.43
4.4.80.0000.0308.43
4.4.70.0030.0178.43
4.4.60.0100.0238.43
4.4.50.0030.0338.43
4.4.40.0070.0338.43
4.4.30.0000.0378.43
4.4.20.0070.0278.43
4.4.10.0070.0308.43
4.4.00.0000.0578.43
4.3.110.0000.0278.43
4.3.100.0100.0278.43
4.3.90.0070.0308.43
4.3.80.0030.0338.43
4.3.70.0030.0138.43
4.3.60.0070.0338.43
4.3.50.0000.0338.43
4.3.40.0000.0508.43
4.3.30.0000.0378.43
4.3.20.0070.0278.43
4.3.10.0000.0378.43
4.3.00.0000.0338.43

preferences:
49.33 ms | 401 KiB | 5 Q