3v4l.org

run code in 300+ PHP versions simultaneously
<?php $times = 1000*100*10; $var = true; $time1 = microtime(true); for ($i = 0; $i <= $times; $i++) { if ($var) {} } $time1 = microtime(true) - $time1; //echo "Time using '!': $time1\n"; $time2 = microtime(true); for ($i = 0; $i <= $times; $i++) { if ($var === true) {} } $time2 = microtime(true) - $time2; //echo "Time using '===': $time2\n"; if ($time1 > $time2){ $p = (($time1-$time2)/$time2) * 100; printf("'===' was faster by %.2f percent.", $p); } else { $p = (($time2-$time1)/$time1) * 100; printf("' ' was faster by %.2f percent.", $p); }

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.4.00.0100.03015.02
7.3.120.0060.03914.99
7.3.110.0100.03615.11
7.3.100.0070.02914.80
7.3.90.0000.02714.89
7.3.80.0030.03114.65
7.3.70.0070.02514.99
7.3.60.0030.03014.89
7.3.50.0030.02714.76
7.3.40.0070.02414.86
7.3.30.0030.02814.63
7.3.20.0030.03716.57
7.3.10.0050.02816.62
7.3.00.0030.02716.52
7.2.250.0030.04514.98
7.2.240.0090.02814.96
7.2.230.0030.03415.16
7.2.220.0030.02814.92
7.2.210.0000.03615.04
7.2.200.0030.02714.81
7.2.190.0030.03515.06
7.2.180.0100.02315.02
7.2.170.0030.03115.08
7.2.130.0030.03016.98
7.2.120.0070.02816.75
7.2.110.0060.03216.75
7.2.100.0070.02416.62
7.2.90.0040.02516.94
7.2.80.0070.02316.96
7.2.70.0070.02716.95
7.2.60.0060.03116.70
7.2.50.0030.03016.80
7.2.40.0070.03016.97
7.2.30.0030.03116.73
7.2.20.0030.03116.64
7.2.10.0100.02416.92
7.2.00.0080.02718.19
7.1.330.0060.07416.02
7.1.320.0000.07915.81
7.1.310.0060.07115.97
7.1.300.0070.07315.78
7.1.290.0000.08915.75
7.1.280.0000.08216.04
7.1.270.0070.08215.61
7.1.260.0070.07615.89
7.1.250.0030.07815.90
7.1.70.0070.02317.19
7.1.60.0100.06219.40
7.1.50.0070.06216.96
7.1.00.0000.05722.51
7.0.200.0040.02816.82
7.0.140.0030.10722.09
7.0.90.0030.07020.16
7.0.80.0070.07319.94
7.0.70.0000.06319.98
7.0.60.0030.09320.08
7.0.50.0530.09720.27
7.0.40.0070.11020.08
7.0.30.0070.07720.10
7.0.20.0070.11020.18
7.0.10.0030.09720.13
7.0.00.0100.10720.12
5.6.280.0100.17721.11
5.6.230.0000.11020.75
5.6.220.0170.13320.66
5.6.210.0030.18020.61
5.6.200.0230.17320.95
5.6.190.0200.14320.93
5.6.180.0100.17021.08
5.6.170.0130.16721.08
5.6.160.0100.16021.07
5.6.150.0130.15021.04
5.6.140.0200.13721.03
5.6.130.0070.10321.02
5.6.120.0100.13721.05
5.6.110.0170.13721.00
5.6.100.0100.15021.15
5.6.90.0070.16020.98
5.6.80.0000.17320.46
5.6.70.0070.18020.37
5.6.60.0070.15320.30
5.6.50.0070.15720.43
5.6.40.0070.13720.48
5.6.30.0070.16020.39
5.6.20.0030.16020.36
5.6.10.0070.11320.39
5.6.00.0030.10720.30
5.5.370.0070.10720.33
5.5.360.0030.10320.43
5.5.350.0030.10320.43
5.5.340.0070.14720.80
5.5.330.0130.15020.77
5.5.320.0130.13720.86
5.5.310.0070.17020.86
5.5.300.0070.13720.75
5.5.290.0100.16720.85
5.5.280.0100.12720.75
5.5.270.0130.16020.77
5.5.260.0070.16020.78
5.5.250.0130.15020.63
5.5.240.0100.15720.26
5.5.230.0070.13320.20
5.5.220.0000.12320.20
5.5.210.0030.10320.15
5.5.200.0200.13720.23
5.5.190.0000.15720.22
5.5.180.0130.15020.14
5.5.160.0100.17020.24
5.5.150.0100.16020.20
5.5.140.0030.16719.97
5.5.130.0030.15720.21
5.5.120.0100.12720.18
5.5.110.0070.15320.24
5.5.100.0030.19019.98
5.5.90.0070.09720.13
5.5.80.0030.10720.11
5.5.70.0170.14720.11
5.5.60.0030.10319.93
5.5.50.0100.11720.06
5.5.40.0070.10020.06
5.5.30.0030.10319.98
5.5.20.0030.15720.09
5.5.10.0030.16020.13
5.5.00.0100.15320.07
5.4.450.0030.17719.36
5.4.440.0100.14319.39
5.4.430.0030.16019.11
5.4.420.0100.10019.44
5.4.410.0000.16319.00
5.4.400.0130.12319.18
5.4.390.0100.13019.10
5.4.380.0030.16019.02
5.4.370.0070.17718.79
5.4.360.0070.09718.95
5.4.350.0070.14718.98
5.4.340.0100.14719.13
5.4.320.0070.14718.95
5.4.310.0070.12719.23
5.4.300.0070.15019.02
5.4.290.0070.15319.06
5.4.280.0100.09718.78
5.4.270.0070.15319.17
5.4.260.0130.14319.12
5.4.250.0030.13018.80
5.4.240.0000.11018.94
5.4.230.0130.15319.21
5.4.220.0000.11018.89
5.4.210.0030.10319.05
5.4.200.0130.10718.93
5.4.190.0170.14718.93
5.4.180.0070.15719.21
5.4.170.0100.14319.02
5.4.160.0000.14718.92
5.4.150.0070.17319.00
5.4.140.0070.18316.13
5.4.130.0070.10716.27
5.4.120.0070.12016.29
5.4.110.0100.14016.31
5.4.100.0000.15016.41
5.4.90.0100.11016.21
5.4.80.0070.13716.34
5.4.70.0070.16316.31
5.4.60.0100.12716.29
5.4.50.0100.11016.23
5.4.40.0000.11716.47
5.4.30.0100.13316.34
5.4.20.0000.15316.20
5.4.10.0100.11316.33
5.4.00.0030.13315.71
5.3.290.0070.11314.60
5.3.280.0070.15014.59
5.3.270.0070.17014.46
5.3.260.0000.15314.60
5.3.250.0030.17714.54
5.3.240.0070.16714.52
5.3.230.0070.16714.51
5.3.220.0030.11314.42
5.3.210.0100.13714.42
5.3.200.0070.16014.55
5.3.190.0030.16314.50
5.3.180.0100.15714.56
5.3.170.0070.15314.52
5.3.160.0100.14314.51
5.3.150.0070.16314.50
5.3.140.0100.11714.41
5.3.130.0070.18314.49
5.3.120.0030.16014.48
5.3.110.0070.17714.40
5.3.100.0100.16013.99
5.3.90.0030.17314.00
5.3.80.0130.15013.90
5.3.70.0030.11313.97
5.3.60.0100.15013.98
5.3.50.0030.15013.92
5.3.40.0200.13713.90
5.3.30.0100.15013.77
5.3.20.0000.19013.72
5.3.10.0030.19013.72
5.3.00.0100.14013.72
5.2.170.0070.19713.72
5.2.160.0030.20013.72
5.2.150.0000.18013.72
5.2.140.0100.19313.72
5.2.130.0170.16313.72
5.2.120.0030.18013.72
5.2.110.0130.20013.72
5.2.100.0170.14313.72
5.2.90.0000.19313.72
5.2.80.0000.17313.72
5.2.70.0070.15313.72
5.2.60.0030.19313.72
5.2.50.0030.18013.72
5.2.40.0000.19313.72
5.2.30.0030.12313.72
5.2.20.0070.18013.72
5.2.10.0030.23713.72
5.2.00.0070.19713.72
5.1.60.0000.18013.72
5.1.50.0030.19713.72
5.1.40.0000.18713.72
5.1.30.0030.11013.72
5.1.20.0000.18013.72
5.1.10.0030.17313.72
5.1.00.0070.18313.72
5.0.50.0000.35013.72
5.0.40.0070.37313.72
5.0.30.0070.37013.72
5.0.20.0070.37713.72
5.0.10.0000.28313.72
5.0.00.0000.32713.72
4.4.90.0030.33713.72
4.4.80.0030.36713.72
4.4.70.0000.31013.72
4.4.60.0030.36313.72
4.4.50.0030.35713.72
4.4.40.0300.35713.72
4.4.30.0030.31313.72
4.4.20.0000.31013.72
4.4.10.0030.36013.72
4.4.00.0000.31313.72
4.3.110.0030.37313.72
4.3.100.0030.34013.72
4.3.90.0000.34013.72
4.3.80.0000.37313.72
4.3.70.0000.29013.72
4.3.60.0070.36013.72
4.3.50.0100.35013.72
4.3.40.0070.33313.72
4.3.30.0070.34313.72
4.3.20.0030.27313.72
4.3.10.0000.32013.72
4.3.00.0000.32313.72

preferences:
46.17 ms | 401 KiB | 5 Q