3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = ['transparent', 'grey', 'transparent', 'grey']; $arr2 = ['grey', 'transparent', 'grey', 'transparent']; $i = 0; $bool = true; for($x = 0; $x<20; $x++){ if($bool){ echo 'color ' . $arr1[$i] . "\n"; }else{ echo 'color ' . $arr2[$i] . "\n"; } $i = ++$i % 4; if($i ==0) $bool = !$bool; if($i ==0) echo "\n"; // to make it easier to read }

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.0040.01118.30
8.3.50.0100.01016.33
8.3.40.0100.00718.71
8.3.30.0070.00718.90
8.3.20.0070.00020.87
8.3.10.0040.00423.48
8.3.00.0080.00019.68
8.2.180.0140.00716.63
8.2.170.0120.00322.96
8.2.160.0030.01021.14
8.2.150.0000.00924.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0000.00726.16
8.2.110.0100.00019.32
8.2.100.0060.00617.78
8.2.90.0070.00018.34
8.2.80.0000.00818.05
8.2.70.0000.00917.63
8.2.60.0090.00017.63
8.2.50.0060.00317.63
8.2.40.0040.00419.44
8.2.30.0080.00318.45
8.2.20.0020.00617.90
8.2.10.0100.00218.49
8.2.00.0070.00418.54
8.1.280.0080.00825.92
8.1.270.0090.00020.60
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0030.00622.54
8.1.230.0070.00420.89
8.1.220.0080.00017.77
8.1.210.0080.00018.89
8.1.200.0030.00517.23
8.1.190.0050.00317.36
8.1.180.0040.00418.10
8.1.170.0000.00818.59
8.1.160.0060.00618.09
8.1.150.0070.00518.10
8.1.140.0080.00419.04
8.1.130.0030.00818.83
8.1.120.0070.00517.45
8.1.110.0080.00417.37
8.1.100.0100.00217.43
8.1.90.0080.00317.40
8.1.80.0080.00417.39
8.1.70.0070.00417.42
8.1.60.0080.00417.55
8.1.50.0090.00417.55
8.1.40.0080.00517.53
8.1.30.0070.00517.60
8.1.20.0030.00717.57
8.1.10.0060.00217.48
8.1.00.0060.00517.50
8.0.300.0030.00319.98
8.0.290.0050.00316.75
8.0.280.0020.00817.61
8.0.270.0080.00316.71
8.0.260.0050.00518.37
8.0.250.0070.00316.85
8.0.240.0090.00216.83
8.0.230.0030.00916.83
8.0.220.0090.00216.75
8.0.210.0070.00416.76
8.0.200.0030.00516.91
8.0.190.0040.00416.81
8.0.180.0030.00716.89
8.0.170.0080.00316.88
8.0.160.0000.00816.76
8.0.150.0070.00316.68
8.0.140.0020.00716.82
8.0.130.0040.00214.97
8.0.120.0030.00416.77
8.0.110.0050.00316.70
8.0.100.0050.00316.69
8.0.90.0050.00416.77
8.0.80.0030.00916.79
8.0.70.0050.00316.74
8.0.60.0070.00216.88
8.0.50.0020.00616.73
8.0.30.0070.00517.00
8.0.20.0080.00916.94
8.0.10.0090.00016.98
8.0.00.0100.00716.82
7.4.330.0080.00116.16
7.4.320.0040.00716.54
7.4.300.0000.01116.52
7.4.290.0050.00616.37
7.4.280.0090.00416.43
7.4.270.0070.00416.54
7.4.260.0090.00114.80
7.4.250.0060.00616.45
7.4.240.0120.00016.53
7.4.230.0110.00016.47
7.4.220.0030.00616.44
7.4.210.0060.00816.57
7.4.200.0090.00216.48
7.4.190.0100.00516.36
7.4.180.0120.00216.46
7.4.160.0140.00016.59
7.4.150.0150.00016.35
7.4.140.0140.00216.23
7.4.130.0110.00616.54
7.4.120.0110.00616.36
7.4.110.0100.00616.48
7.4.100.0090.00816.41
7.4.90.0100.00716.43
7.4.80.0150.00217.84
7.4.70.0080.00816.45
7.4.60.0090.00616.45
7.4.50.0100.00616.41
7.4.40.0080.01016.40
7.4.30.0080.00816.26
7.4.20.0120.00516.31
7.4.10.0090.00716.43
7.4.00.0090.00516.42
7.3.330.0080.00416.20
7.3.320.0080.00314.59
7.3.310.0040.00816.21
7.3.300.0050.00716.22
7.3.290.0080.00716.27
7.3.280.0120.00516.17
7.3.270.0150.00016.14
7.3.260.0060.01116.33
7.3.250.0140.00316.35
7.3.240.0100.00716.43
7.3.230.0120.00516.26
7.3.220.0160.00015.95
7.3.210.0120.00516.18
7.3.200.0110.00516.27
7.3.190.0160.00316.23
7.3.180.0080.00916.23
7.3.170.0140.00416.25
7.3.160.0130.00716.32
7.3.150.0100.00516.20
7.3.140.0070.00816.21
7.3.130.0080.00716.34
7.3.120.0050.00916.29
7.3.110.0090.00516.06
7.3.100.0110.00416.19
7.3.90.0100.00516.39
7.3.80.0090.00716.31
7.3.70.0080.00616.31
7.3.60.0070.01016.39
7.3.50.0090.00616.42
7.3.40.0090.00916.33
7.3.30.0090.00916.21
7.3.20.0110.00417.18
7.3.10.0090.00817.24
7.3.00.0110.00517.19
7.2.340.0110.00416.23
7.2.330.0070.01016.54
7.2.320.0060.00916.37
7.2.310.0090.00716.51
7.2.300.0070.01016.48
7.2.290.0110.00316.52
7.2.280.0110.00416.14
7.2.270.0090.00716.42
7.2.260.0090.00616.41
7.2.250.0130.00216.46
7.2.240.0020.01216.37
7.2.230.0090.00616.41
7.2.220.0080.00716.50
7.2.210.0050.01016.51
7.2.200.0110.00416.59
7.2.190.0100.00516.45
7.2.180.0090.00616.62
7.2.170.0120.00316.59
7.2.160.0120.00416.60
7.2.150.0110.00517.39
7.2.140.0100.00517.45
7.2.130.0110.00617.59
7.2.120.0040.01117.47
7.2.110.0110.00517.57
7.2.100.0140.00217.45
7.2.90.0120.00717.42
7.2.80.0070.00817.36
7.2.70.0080.00817.59
7.2.60.0100.00417.51
7.2.50.0120.00417.53
7.2.40.0090.00617.43
7.2.30.0090.00617.58
7.2.20.0080.00817.55
7.2.10.0190.00817.61
7.2.00.0090.00617.38

preferences:
54 ms | 400 KiB | 5 Q