3v4l.org

run code in 300+ PHP versions simultaneously
<?php $firstLoop = microtime(true); for ($i = 0; $i < 1000000; $i++) { $testOne = max($i, 1000000); } error_log(microtime(true) - $firstLoop); $secondLoop = microtime(true); // 1.3123650550842 for ($i = 0; $i < 1000000; $i++) { $testTwo = $i > 1000000 ? $i : 1000000; } error_log(microtime(true) - $secondLoop); // 0.090374946594238

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.2.40.0090.03517.62
8.2.30.0160.02817.62
8.2.20.0110.03317.62
8.2.10.0120.03117.62
8.2.00.0100.03317.62
8.1.170.0040.04018.27
8.1.160.0100.03417.62
8.1.150.0160.03117.62
8.1.140.0130.03217.62
8.1.130.0070.03717.62
8.1.120.0040.04017.62
8.1.110.0190.03117.62
8.1.100.0090.03317.47
8.1.90.0100.03217.50
8.1.80.0160.03217.50
8.1.70.0070.03717.46
8.1.60.0090.04517.52
8.1.50.0180.04717.51
8.1.40.0180.04117.50
8.1.30.0140.04917.60
8.1.20.0130.04117.58
8.1.10.0140.04617.46
8.1.00.0170.04517.49
8.0.280.0190.02517.62
8.0.270.0100.03517.62
8.0.260.0140.03117.62
8.0.250.0040.04017.62
8.0.240.0160.02817.62
8.0.230.0070.03717.21
8.0.220.0060.04217.26
8.0.210.0120.03717.20
8.0.200.0090.03517.21
8.0.190.0030.05117.03
8.0.180.0100.04717.13
8.0.170.0140.04817.07
8.0.160.0140.04617.09
8.0.150.0170.04217.11
8.0.140.0180.04217.09
8.0.130.0130.04517.13
8.0.120.0150.03917.04
8.0.110.0130.04417.08
8.0.100.0160.04317.03
8.0.90.0150.04317.13
8.0.80.0130.04217.13
8.0.70.0140.03917.13
8.0.60.0120.04417.09
8.0.50.0130.04317.15
8.0.30.0170.03917.11
8.0.20.0110.03717.13
8.0.10.0150.04717.21
8.0.00.0050.04917.22
7.4.330.0100.03517.62
7.4.320.0160.04017.62
7.4.300.0150.03317.05
7.4.290.0150.04716.77
7.4.280.0130.05316.93
7.4.270.0160.04916.80
7.4.260.0180.04916.83
7.4.250.0130.05316.83
7.4.240.0170.04716.88
7.4.230.0160.04916.78
7.4.220.0110.04716.83
7.4.210.0160.04216.88
7.4.200.0100.04816.91
7.4.190.0130.04616.92
7.4.180.0140.04716.90
7.4.160.0140.04416.86
7.4.150.0100.05016.84
7.4.140.0110.05016.82
7.4.130.0110.04816.81
7.4.120.0090.04516.70
7.4.110.0100.05216.77
7.4.100.0080.05116.87
7.4.90.0080.04616.79
7.4.80.0130.04616.77
7.4.70.0140.04516.83
7.4.60.0150.04816.80
7.4.50.0100.04816.70
7.4.40.0140.04916.70
7.4.30.0060.05816.71
7.4.20.0120.04316.72
7.4.10.0110.04616.73
7.4.00.0090.05016.79
7.3.330.0120.05916.59
7.3.320.0150.05716.66
7.3.310.0130.06316.70
7.3.300.0140.06016.68
7.3.290.0140.05616.74
7.3.280.0130.05816.61
7.3.270.0120.06316.70
7.3.260.0100.06216.61
7.3.250.0160.05416.75
7.3.240.0140.05916.69
7.3.230.0200.05816.77
7.3.220.0130.05816.69
7.3.210.0160.06116.68
7.3.200.0110.06016.68
7.3.190.0150.05416.72
7.3.180.0150.05816.63
7.3.170.0150.06916.59
7.3.160.0190.04816.65
7.3.150.0140.05416.72
7.3.140.0160.05616.71
7.3.130.0150.05516.72
7.3.120.0160.05016.68
7.3.110.0140.05916.62
7.3.100.0130.06316.58
7.3.90.0170.06116.87
7.3.80.0150.06815.94
7.3.70.0140.06515.38
7.3.60.0110.06915.47
7.3.50.0100.07415.38
7.3.40.0100.06615.39
7.3.30.0110.06715.37
7.3.20.0170.06615.80
7.3.10.0190.06415.79
7.3.00.0140.06715.83
7.2.340.0110.06016.77
7.2.330.0110.06316.81
7.2.320.0150.06516.76
7.2.310.0180.05516.81
7.2.300.0120.05716.69
7.2.290.0130.05616.81
7.2.280.0130.06716.77
7.2.270.0150.07016.79
7.2.260.0100.06316.68
7.2.250.0140.05316.68
7.2.240.0160.06316.64
7.2.230.0140.05316.66
7.2.220.0100.06916.80
7.2.210.0160.07616.04
7.2.200.0090.06615.57
7.2.190.0100.07015.56
7.2.180.0120.07215.58
7.2.170.0060.07015.56
7.2.160.0150.06115.58
7.2.150.0150.07316.00
7.2.140.0170.07316.01
7.2.130.0150.06816.00
7.2.120.0150.06915.98
7.2.110.0230.07116.01
7.2.100.0180.06116.03
7.2.90.0150.06615.97
7.2.80.0160.07016.05
7.2.70.0130.06716.07
7.2.60.0170.06715.97
7.2.50.0210.06216.06
7.2.40.0140.07616.02
7.2.30.0160.06616.00
7.2.20.0160.06316.05
7.2.10.0140.06616.04
7.2.00.0180.07016.10
7.1.330.0150.09216.83
7.1.320.0110.09816.74
7.1.310.0160.11215.67
7.1.300.0360.10615.11
7.1.290.0220.09215.06
7.1.280.0140.09815.03
7.1.270.0140.09015.05
7.1.260.0220.08815.09
7.1.250.0180.10015.06
7.1.240.0120.07516.84
7.1.230.0170.08116.83
7.1.220.0110.08716.85
7.1.210.0140.07516.90
7.1.200.0130.08616.83
7.1.190.0080.08516.86
7.1.180.0120.08016.75
7.1.170.0160.07516.72
7.1.160.0100.07716.74
7.1.150.0100.08116.70
7.1.140.0160.08416.71
7.1.130.0130.07216.71
7.1.120.0240.07016.79
7.1.110.0150.07716.71
7.1.100.0130.07516.83
7.1.90.0150.08316.77
7.1.80.0120.08016.75
7.1.70.0110.07416.75
7.1.60.0140.10416.78
7.1.50.0110.07716.76
7.1.40.0150.08516.91
7.1.30.0110.07816.75
7.1.20.0110.07616.71
7.1.10.0130.08816.78
7.1.00.0130.08516.67

preferences:
32.07 ms | 403 KiB | 5 Q