3v4l.org

run code in 300+ PHP versions simultaneously
<?php $commands = array("mark", "ignore", "pick", "random"); $attempts = array("mark", "ignore", "pick", "random", "bonk"); foreach($attempts as $attempt){ echo "$attempt => "; $index=array_search($attempt,$commands); if($index===false || !isset($commands[++$index])){ // not found or found last element $index=0; // use first element } echo $commands[$index],"\n"; }

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.0130.00916.82
8.5.00.0130.01420.14
8.4.150.0020.00114.05
8.4.140.0110.01017.64
8.4.130.0050.00417.78
8.4.120.0090.01020.58
8.4.110.0140.00522.55
8.4.100.0090.01218.89
8.4.90.0120.00918.77
8.4.80.0030.00520.12
8.4.70.0110.00818.02
8.4.60.0130.00718.65
8.4.50.0130.00718.49
8.4.40.0070.01417.75
8.4.30.0130.00617.78
8.4.20.0050.00517.64
8.4.10.0070.01317.54
8.3.280.0090.00318.37
8.3.270.0100.01116.39
8.3.260.0090.01016.76
8.3.250.0040.00418.96
8.3.240.0110.00917.18
8.3.230.0090.00916.66
8.3.220.0120.00418.83
8.3.210.0080.01016.55
8.3.200.0040.00416.71
8.3.190.0070.00117.02
8.3.180.0120.00817.08
8.3.170.0110.00720.80
8.3.160.0040.01416.86
8.3.150.0120.00617.27
8.3.140.0070.01116.29
8.3.130.0060.00316.62
8.3.120.0000.00920.53
8.3.110.0000.00920.94
8.3.100.0050.00524.06
8.3.90.0040.00426.77
8.3.80.0120.00318.43
8.3.70.0160.00018.55
8.3.60.0110.00418.55
8.3.50.0090.00916.60
8.3.40.0060.00919.00
8.3.30.0180.00418.70
8.3.20.0080.00020.16
8.3.10.0040.00423.65
8.3.00.0050.00319.68
8.2.290.0120.00620.37
8.2.280.0140.00518.54
8.2.270.0090.00616.33
8.2.260.0030.01516.42
8.2.250.0040.00418.57
8.2.240.0070.01117.20
8.2.230.0060.00322.58
8.2.220.0040.00837.54
8.2.210.0110.00326.77
8.2.200.0090.00016.75
8.2.190.0100.00716.88
8.2.180.0060.01216.73
8.2.170.0140.00022.96
8.2.160.0030.01020.37
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0090.00019.64
8.2.120.0000.00826.35
8.2.110.0070.00322.11
8.2.100.0040.00717.84
8.2.90.0040.00417.88
8.2.80.0000.00818.73
8.2.70.0040.00417.75
8.2.60.0030.00618.04
8.2.50.0000.00818.07
8.2.40.0040.00418.29
8.2.30.0030.00618.18
8.2.20.0070.00018.00
8.2.10.0000.00718.12
8.2.00.0000.00718.11
8.1.330.0090.01021.88
8.1.320.0100.00916.02
8.1.310.0110.00416.26
8.1.300.0030.00618.53
8.1.290.0000.01030.84
8.1.280.0060.00925.92
8.1.270.0030.00520.38
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00023.98
8.1.230.0070.00420.91
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0000.00917.23
8.1.190.0060.00317.23
8.1.180.0040.00418.10
8.1.170.0040.00418.91
8.1.160.0050.00218.80
8.1.150.0000.00820.25
8.1.140.0000.00817.70
8.1.130.0040.00419.15
8.1.120.0000.00717.49
8.1.110.0030.00517.44
8.1.100.0000.00717.39
8.1.90.0060.00317.52
8.1.80.0000.00817.36
8.1.70.0000.00717.36
8.1.60.0070.00417.47
8.1.50.0030.00617.50
8.1.40.0000.00817.53
8.1.30.0040.00417.64
8.1.20.0000.00717.57
8.1.10.0040.00417.58
8.1.00.0030.00517.51
8.0.300.0020.00518.77
8.0.290.0060.00316.63
8.0.280.0060.00320.16
8.0.270.0080.00016.74
8.0.260.0000.00716.82
8.0.250.0030.00316.93
8.0.240.0030.00316.95
8.0.230.0040.00416.94
8.0.220.0080.00016.82
8.0.210.0000.00716.80
8.0.200.0000.00716.84
8.0.190.0070.00016.87
8.0.180.0040.00416.88
8.0.170.0000.00916.89
8.0.160.0000.00716.91
8.0.150.0000.00716.84
8.0.140.0000.00716.82
8.0.130.0050.00013.29
8.0.120.0040.00416.77
8.0.110.0040.00416.86
8.0.100.0070.00016.95
8.0.90.0040.00417.00
8.0.80.0030.01416.93
8.0.70.0040.00416.85
8.0.60.0000.00916.91
8.0.50.0000.00716.78
8.0.30.0070.01017.07
8.0.20.0080.01117.40
8.0.10.0020.00516.89
8.0.00.0110.00816.85
7.4.330.0050.00015.55
7.4.320.0050.00216.61
7.4.300.0030.00316.51
7.4.290.0030.00516.51
7.4.280.0000.00816.59
7.4.270.0110.00016.37
7.4.260.0030.00316.44
7.4.250.0030.00316.42
7.4.240.0000.00816.65
7.4.230.0040.00416.51
7.4.220.0050.00316.70
7.4.210.0090.00716.61
7.4.200.0050.00216.62
7.4.160.0110.00916.53
7.4.150.0140.00317.40
7.4.140.0070.01117.86
7.4.130.0120.01016.41
7.4.120.0160.00616.50
7.4.110.0040.01316.33
7.4.100.0040.01516.64
7.4.90.0090.00916.49
7.4.80.0190.00719.39
7.4.70.0110.00816.56
7.4.60.0110.00516.54
7.4.50.0070.01116.32
7.4.40.0140.00316.58
7.4.00.0040.01414.71
7.3.330.0050.00013.06
7.3.320.0030.00313.05
7.3.310.0050.00316.39
7.3.300.0000.00716.38
7.3.290.0070.00016.35
7.3.280.0120.00416.31
7.3.270.0150.00417.40
7.3.260.0090.01116.47
7.3.240.0070.00916.45
7.3.230.0110.00716.48
7.3.210.0100.00716.40
7.3.200.0130.00416.39
7.3.190.0150.00616.49
7.3.180.0100.00716.45
7.3.170.0060.01016.38
7.3.160.0090.00616.68
7.2.330.0060.01116.56
7.2.320.0080.00816.72
7.2.310.0050.01816.59
7.2.300.0090.00916.54
7.2.290.0040.01616.56
7.2.60.0040.01116.73
7.2.20.0130.01518.05
7.2.10.0090.01217.81
7.2.00.0140.01218.09
7.1.200.0070.00315.54
7.1.140.0100.00916.99
7.1.130.0050.01516.81
7.1.120.0130.01116.76
7.1.110.0110.00916.00
7.1.100.0120.01116.38
7.1.90.0170.01016.46
7.1.80.0120.01116.34
7.1.70.0090.01015.43
7.1.60.0320.01233.41
7.1.50.0270.01732.98
7.1.40.0400.01632.80
7.1.30.0320.01232.76
7.1.20.0300.02332.75
7.1.10.0090.01714.76
7.1.00.0160.01214.80

preferences:
178.57 ms | 403 KiB | 5 Q