3v4l.org

run code in 300+ PHP versions simultaneously
<?php $selection = []; foreach ([true, false] as $a) { foreach ([true, false] as $b) { $iteration = ''; $iteration .= ($a ? 'true' : 'false'); $iteration .= '-'; $iteration .= ($b ? 'true' : 'false'); $selection[$iteration] = 'nothing'; $selection[$iteration] = $a ? 'first' : ($b ? 'second' : 'third'); } } print_r($selection); $selection = []; foreach ([true, false] as $a) { foreach ([true, false] as $b) { $iteration = ''; $iteration .= ($a ? 'true' : 'false'); $iteration .= '-'; $iteration .= ($b ? 'true' : 'false'); $selection[$iteration] = 'nothing'; $selection[$iteration] = $a ? 'first' : $b ? 'second' : 'third'; } } print_r($selection);

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.0100.00816.54
8.5.00.0130.00820.05
8.4.160.0130.01023.75
8.4.150.0020.00014.05
8.4.140.0140.00717.68
8.4.130.0100.00717.90
8.4.120.0160.00322.15
8.4.110.0080.01222.34
8.4.100.0120.00917.67
8.4.90.0150.00618.47
8.4.80.0130.00819.64
8.4.70.0050.00417.81
8.4.60.0100.01218.87
8.4.50.0100.01018.81
8.4.40.0100.01017.87
8.4.30.0030.01617.61
8.4.20.0140.00719.33
8.4.10.0100.00717.84
8.3.290.0140.00618.43
8.3.280.0120.00918.33
8.3.270.0100.01016.88
8.3.260.0130.00616.59
8.3.250.0070.00219.11
8.3.240.0090.00916.55
8.3.230.0110.00716.48
8.3.220.0140.00517.29
8.3.210.0110.00716.57
8.3.200.0070.00216.86
8.3.190.0100.00717.00
8.3.180.0070.01116.74
8.3.170.0190.00016.91
8.3.160.0180.00318.58
8.3.150.0130.01018.65
8.3.140.0060.00317.09
8.3.130.0090.00018.43
8.3.120.0040.00416.72
8.3.110.0030.00616.38
8.3.100.0130.00318.58
8.3.90.0030.01218.55
8.3.80.0090.00018.30
8.3.70.0040.01218.30
8.3.60.0160.00318.20
8.3.50.0080.00819.13
8.3.40.0070.00718.67
8.3.30.0070.00718.71
8.3.20.0050.00322.00
8.3.10.0000.00820.48
8.3.00.0030.00523.71
8.2.300.0100.01317.96
8.2.290.0070.00320.36
8.2.280.0100.00918.29
8.2.270.0140.00417.05
8.2.260.0040.00418.09
8.2.250.0000.00916.66
8.2.240.0080.00017.11
8.2.230.0040.00420.94
8.2.220.0090.00024.06
8.2.210.0000.00826.77
8.2.200.0030.00618.04
8.2.190.0090.00616.63
8.2.180.0210.00018.12
8.2.170.0080.00822.96
8.2.160.0100.00320.27
8.2.150.0000.00924.18
8.2.140.0060.00324.66
8.2.130.0070.00020.52
8.2.120.0080.00026.35
8.2.110.0040.00722.11
8.2.100.0100.00018.09
8.2.90.0030.00619.82
8.2.80.0040.00417.97
8.2.70.0060.00317.91
8.2.60.0060.00318.09
8.2.50.0040.00418.10
8.2.40.0000.00720.49
8.2.30.0030.00519.02
8.2.20.0000.00718.00
8.2.10.0000.00818.00
8.2.00.0000.00717.94
8.1.340.0100.01017.45
8.1.330.0040.00823.51
8.1.320.0090.01016.07
8.1.310.0060.00318.22
8.1.300.0110.00718.09
8.1.290.0050.00230.84
8.1.280.0000.01525.92
8.1.270.0030.00622.02
8.1.260.0040.00426.35
8.1.250.0100.00028.09
8.1.240.0080.00022.04
8.1.230.0080.00419.16
8.1.220.0080.00017.74
8.1.210.0000.00918.77
8.1.200.0030.00617.10
8.1.190.0000.00917.10
8.1.180.0040.00418.10
8.1.170.0030.00618.64
8.1.160.0020.00518.77
8.1.150.0050.00318.77
8.1.140.0040.00419.00
8.1.130.0070.00017.40
8.1.120.0000.00717.26
8.1.110.0060.00317.24
8.1.100.0070.00017.29
8.1.90.0030.00517.25
8.1.80.0000.00717.31
8.1.70.0000.00717.27
8.1.60.0030.00617.36
8.1.50.0080.00017.37
8.1.40.0070.00017.36
8.1.30.0000.00817.46
8.1.20.0000.00817.51
8.1.10.0020.00517.40
8.1.00.0040.00417.33
8.0.300.0060.00319.60
8.0.290.0030.00516.75
8.0.280.0000.00718.44
8.0.270.0030.00617.13
8.0.260.0060.00316.73
8.0.250.0000.00616.85
8.0.240.0050.00316.78
8.0.230.0000.00716.89
8.0.220.0040.00416.82
8.0.210.0000.00716.84
8.0.200.0030.00316.84
8.0.190.0050.00316.89
8.0.180.0000.00716.85
8.0.170.0040.00416.89
8.0.160.0070.00016.83
8.0.150.0000.00716.75
8.0.140.0000.00816.76
8.0.130.0000.00913.27
8.0.120.0080.00016.86
8.0.110.0000.00716.69
8.0.100.0060.00316.78
8.0.90.0040.00416.71
8.0.80.0090.00616.84
8.0.70.0080.00016.75
8.0.60.0000.00716.67
8.0.50.0040.00416.94
8.0.30.0100.00816.90
8.0.20.0090.01117.40
8.0.10.0080.00016.95
8.0.00.0090.00916.55
7.4.330.0030.00316.79
7.4.320.0000.00616.47
7.4.300.0030.00316.53
7.4.290.0060.00316.58
7.4.280.0030.00716.57
7.4.270.0030.00316.36
7.4.260.0050.00516.44
7.4.250.0070.00016.36
7.4.240.0000.00816.47
7.4.230.0000.00716.40
7.4.220.0000.00716.34
7.4.210.0070.00716.43
7.4.200.0030.00516.30
7.4.160.0060.01116.49
7.4.150.0060.01117.40
7.4.140.0130.01017.86
7.4.130.0140.00316.65
7.4.120.0110.01016.58
7.4.110.0070.01016.60
7.4.100.0150.00316.55
7.4.90.0070.01016.55
7.4.80.0060.01119.39
7.4.70.0100.01316.62
7.4.60.0060.00916.53
7.4.50.0070.00716.48
7.4.40.0070.01016.56
7.4.30.0090.00616.63
7.4.00.0090.00315.11
7.3.330.0060.00013.27
7.3.320.0000.00613.18
7.3.310.0040.00416.43
7.3.300.0020.00516.39
7.3.290.0080.01016.36
7.3.280.0050.00916.36
7.3.270.0140.00317.40
7.3.260.0120.00816.34
7.3.250.0100.00816.54
7.3.240.0080.01016.46
7.3.230.0060.01116.37
7.3.210.0030.01616.56
7.3.200.0090.00616.54
7.3.190.0140.00716.18
7.3.180.0090.00616.66
7.3.170.0100.00716.25
7.3.160.0170.00316.60
7.2.330.0070.01116.49
7.2.320.0130.01016.61
7.2.310.0080.00916.55
7.2.300.0040.01416.56
7.2.290.0150.00916.38
7.2.60.0090.00316.89
7.2.00.0050.01019.71
7.1.200.0040.01215.83
7.1.120.0070.00718.67
7.1.110.0030.01017.87
7.1.100.0030.01018.08
7.1.90.0060.00618.29
7.1.80.0000.01418.10
7.1.70.0030.01217.32
7.1.60.0160.00935.20
7.1.50.0180.00734.50
7.1.40.0180.00734.39
7.1.30.0140.01034.48
7.1.20.0130.01334.46
7.1.10.0090.00616.52
7.1.00.0040.00816.63

preferences:
170.67 ms | 403 KiB | 5 Q