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); printf("'===' was faster"); } else { $p = (($time2-$time1)/$time1) * 100; //printf("' ' was faster by %.2f percent.", $p); printf("' ' was faster"); }

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.0070.03514.82
7.3.120.0130.02614.59
7.3.110.0060.03114.53
7.3.100.0100.02314.73
7.3.90.0060.02214.87
7.3.80.0030.02414.88
7.3.70.0090.02915.02
7.3.60.0030.03214.96
7.3.50.0030.03114.76
7.3.40.0100.03614.90
7.3.30.0000.03315.02
7.3.20.0070.02316.48
7.3.10.0030.02316.42
7.3.00.0070.02616.75
7.2.250.0030.04614.70
7.2.240.0030.03614.94
7.2.230.0030.03815.21
7.2.220.0060.02515.23
7.2.210.0030.03415.22
7.2.200.0070.03015.11
7.2.190.0030.03014.85
7.2.180.0030.04015.25
7.2.170.0030.03415.09
7.2.00.0030.03219.06
7.1.330.0070.07515.79
7.1.320.0100.07815.89
7.1.310.0030.09415.78
7.1.300.0000.07915.64
7.1.290.0100.08315.75
7.1.280.0000.08915.52
7.1.270.0030.07415.83
7.1.260.0030.07715.83
7.1.70.0030.02817.26
7.1.60.0030.06119.33
7.1.50.0000.06017.11
7.1.00.0000.11022.44
7.0.200.0000.03516.85
7.0.140.0070.10722.00
7.0.100.0270.10320.03
7.0.90.0130.11319.98
7.0.80.0100.10319.96
7.0.70.0430.09320.02
7.0.60.0270.10019.90
7.0.50.0100.11320.36
7.0.40.0070.11020.06
7.0.30.0070.07720.07
7.0.20.0000.12320.07
7.0.10.0100.10320.03
7.0.00.0030.11020.14
5.6.280.0030.18021.02
5.6.250.0100.13320.66
5.6.240.0100.13320.66
5.6.230.0070.10320.49
5.6.220.0170.15720.70
5.6.210.0100.15720.61
5.6.200.0070.16320.96
5.6.190.0070.12321.02
5.6.180.0170.15021.03
5.6.170.0070.15021.17
5.6.160.0000.12021.17
5.6.150.0070.14321.08
5.6.140.0070.13721.05
5.6.130.0100.17321.02
5.6.120.0000.11321.04
5.6.110.0100.13721.06
5.6.100.0100.10021.00
5.6.90.0070.14021.09
5.6.80.0070.13320.39
5.6.70.0030.11320.39
5.6.60.0030.12720.45
5.6.50.0030.12720.52
5.6.40.0030.09720.49
5.6.30.0070.16720.38
5.6.20.0100.09320.30
5.6.10.0100.15320.48
5.6.00.0130.12720.35
5.5.380.0030.16020.50
5.5.370.0070.12020.45
5.5.360.0130.16020.32
5.5.350.0070.12720.43
5.5.340.0030.16020.79
5.5.330.0070.13720.64
5.5.320.0100.14020.80
5.5.310.0130.15720.81
5.5.300.0030.10020.87
5.5.290.0070.14320.87
5.5.280.0070.15020.73
5.5.270.0130.13020.82
5.5.260.0130.09320.80
5.5.250.0000.10320.69
5.5.240.0100.15320.06
5.5.230.0100.13320.25
5.5.220.0100.09320.30
5.5.210.0070.12020.26
5.5.200.0070.15720.13
5.5.190.0130.13720.22
5.5.180.0070.10020.22
5.5.160.0130.10720.17
5.5.150.0070.09720.21
5.5.140.0100.15020.13
5.5.130.0100.10320.24
5.5.120.0030.11020.23
5.5.110.0100.09720.24
5.5.100.0070.10019.96
5.5.90.0070.11320.06
5.5.80.0070.10019.94
5.5.70.0070.08020.07
5.5.60.0030.10720.04
5.5.50.0000.10020.06
5.5.40.0030.10019.95
5.5.30.0030.10720.04
5.5.20.0030.10719.99
5.5.10.0070.14020.09
5.5.00.0100.09719.95
5.4.450.0000.11719.45
5.4.440.0030.13719.39
5.4.430.0200.13719.36
5.4.420.0130.13319.37
5.4.410.0070.12719.17
5.4.400.0030.12719.04
5.4.390.0070.09018.91
5.4.380.0070.15719.15
5.4.370.0070.09718.82
5.4.360.0030.10319.06
5.4.350.0030.11719.15
5.4.340.0000.17019.06
5.4.320.0130.13318.90
5.4.310.0030.16018.90
5.4.300.0070.14319.07
5.4.290.0000.13318.90
5.4.280.0070.10719.10
5.4.270.0030.11319.11
5.4.260.0030.09718.94
5.4.250.0070.09719.11
5.4.240.0030.10018.97
5.4.230.0070.08718.80
5.4.220.0100.09719.22
5.4.210.0030.09719.12
5.4.200.0100.12318.89
5.4.190.0030.10019.03
5.4.180.0070.10019.13
5.4.170.0030.10018.89
5.4.160.0100.09018.95
5.4.150.0000.08319.11
5.4.140.0000.11716.25
5.4.130.0000.10716.30
5.4.120.0070.07716.23
5.4.110.0030.09316.23
5.4.100.0100.08716.44
5.4.90.0070.09316.25
5.4.80.0030.08016.43
5.4.70.0100.10716.38
5.4.60.0070.09316.24
5.4.50.0070.14716.23
5.4.40.0100.15716.46
5.4.30.0070.13316.28
5.4.20.0000.15316.41
5.4.10.0170.14316.18
5.4.00.0030.16315.73
5.3.290.0000.17714.52
5.3.280.0030.15714.57
5.3.270.0030.11014.56
5.3.260.0030.11314.46
5.3.250.0000.10314.46
5.3.240.0000.12314.59
5.3.230.0030.10714.45
5.3.220.0000.11314.57
5.3.210.0030.11314.41
5.3.200.0030.10314.55
5.3.190.0070.11014.57
5.3.180.0000.13014.44
5.3.170.0070.15314.43
5.3.160.0030.14714.42
5.3.150.0130.15014.53
5.3.140.0030.11014.54
5.3.130.0070.15714.49
5.3.120.0030.18314.46
5.3.110.0030.18714.55
5.3.100.0030.11013.98
5.3.90.0070.16714.02
5.3.80.0200.14713.93
5.3.70.0030.13713.95
5.3.60.0030.17013.78
5.3.50.0070.13313.75
5.3.40.0030.16013.86
5.3.30.0100.10713.90
5.3.20.0030.16713.68
5.3.10.0030.13713.51
5.3.00.0070.14713.41
5.2.170.0100.19311.00
5.2.160.0100.18011.11
5.2.150.0070.16710.94
5.2.140.0030.16311.09
5.2.130.0070.17710.92
5.2.120.0000.15311.14
5.2.110.0130.19311.12
5.2.100.0100.15310.89
5.2.90.0070.16010.97
5.2.80.0030.19710.89
5.2.70.0100.16711.16
5.2.60.0070.17311.04
5.2.50.0030.20310.97
5.2.40.0000.13310.98
5.2.30.0100.19010.97
5.2.20.0030.20710.92
5.2.10.0100.16710.81
5.2.00.0030.13010.57
5.1.60.0100.13710.04
5.1.50.0030.19310.03
5.1.40.0000.13010.06
5.1.30.0100.15310.34
5.1.20.0030.19310.27
5.1.10.0000.18710.09
5.1.00.0000.18010.05
5.0.50.0030.3309.27
5.0.40.0030.3209.27
5.0.30.0000.3379.27
5.0.20.0100.3609.27
5.0.10.0000.3909.27
5.0.00.0030.3939.27
4.4.90.0030.3579.27
4.4.80.0030.3579.27
4.4.70.0000.3309.27
4.4.60.0030.3539.27
4.4.50.0000.3039.27
4.4.40.0000.3639.27
4.4.30.0070.3609.27
4.4.20.0000.3379.27
4.4.10.0030.3109.27
4.4.00.0000.3639.27
4.3.110.0030.3439.27
4.3.100.0000.3679.27
4.3.90.0070.3609.27
4.3.80.0100.3609.27
4.3.70.0000.3379.27
4.3.60.0030.3479.27
4.3.50.0000.3609.27
4.3.40.0000.2909.27
4.3.30.0070.3009.27
4.3.20.0000.3579.27
4.3.10.0000.3509.27
4.3.00.0000.3439.27

preferences:
43.95 ms | 400 KiB | 5 Q