3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = microtime(true); for($i = 0; $i < 100000000; $i++) { if(2 === 0) {} else if(2 === 1) {} else {} } $end = microtime(true); echo "1: ".($end - $start)."\n"; unset($start, $end); $start = microtime(true); for($i = 0; $i < 100000000; $i++) { if(2 === 0) {} elseif(2 === 1) {} else {} } $end = microtime(true); echo "2: ".($end - $start); ?>

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)
7.2.00.0032.38619.42
7.1.70.0002.26117.07
7.1.60.0102.22419.32
7.1.50.3332.13216.79
7.1.00.0072.33322.49
7.0.200.0072.49416.87
7.0.140.0032.49722.18
7.0.60.0132.14019.87
7.0.50.0102.38017.81
7.0.40.0172.29020.04
7.0.30.0572.25320.02
7.0.20.2532.24719.72
7.0.10.0272.29320.13
7.0.00.0132.26320.09
5.6.280.0102.49021.13
5.6.210.0232.46020.51
5.6.200.0032.49718.13
5.6.190.0032.49720.16
5.6.180.0132.48720.17
5.6.170.0402.46020.33
5.6.160.0032.49720.33
5.6.150.0102.49018.16
5.6.140.0102.49018.14
5.6.130.0072.49318.13
5.6.120.0232.47721.05
5.6.110.0172.48320.98
5.6.100.0102.49021.10
5.6.90.0102.47720.88
5.6.80.0032.49720.36
5.5.350.0302.47020.46
5.5.340.0132.48717.96
5.5.330.0072.49320.16
5.5.320.0302.47020.16
5.5.310.0372.46319.89
5.5.300.0032.49717.91
5.5.290.0032.49717.89
5.5.280.0132.48720.61
5.5.270.0102.49020.96
5.5.260.0132.48720.96
5.5.250.1472.35020.46
5.5.240.0102.49020.12
5.4.450.0432.45319.47
5.4.440.4002.09719.14
5.4.430.0232.47319.20
5.4.420.0272.47019.14
5.4.410.0172.48318.94
5.4.400.0232.47319.00
5.4.390.3432.15319.15
5.4.380.1232.37318.96
5.4.370.0302.46718.86
5.4.360.3072.19019.01
5.4.350.0132.48319.06
5.4.340.0172.48019.13
5.4.320.0081.99112.45
5.4.310.0151.99412.45
5.4.300.0121.98912.46
5.4.290.0131.98812.45
5.4.280.0191.98312.35
5.4.270.0101.99212.35
5.4.260.0231.98012.35
5.4.250.0091.98812.35
5.4.240.0111.99112.35
5.4.230.0051.99512.34
5.4.220.0151.98212.34
5.4.210.0091.99712.34
5.4.200.0151.98412.34
5.4.190.0101.73612.34
5.4.180.0131.79512.34
5.4.170.0121.25012.35
5.4.160.0231.97712.35
5.4.150.0411.67712.34
5.4.140.0201.98012.02
5.4.130.0101.98912.02
5.4.120.0101.99311.97
5.4.110.0101.99111.97
5.4.100.0071.99211.96
5.4.90.0081.99311.96
5.4.80.0101.99211.97
5.4.70.0101.98811.96
5.4.60.0081.99111.96
5.4.50.0101.99511.96
5.4.40.0061.99811.95
5.4.30.0101.99111.95
5.4.20.0091.99311.95
5.4.10.0121.99211.95
5.4.00.0031.99711.44

preferences:
32.71 ms | 400 KiB | 5 Q