3v4l.org

run code in 300+ PHP versions simultaneously
<?php $times = 10000; $var = null; $var = new stdClass(); $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 === null) {} } $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.3.120.0090.00914.85
7.3.110.0030.01514.60
7.3.100.0090.00614.56
7.3.90.0060.00914.83
7.3.80.0030.00914.63
7.3.70.0090.00614.82
7.3.60.0060.01014.70
7.3.50.0060.00914.79
7.3.40.0000.01414.73
7.3.30.0100.00714.79
7.3.20.0130.00016.63
7.3.10.0080.00816.67
7.3.00.0100.00316.41
7.2.240.0060.00614.96
7.2.230.0100.00715.18
7.2.220.0030.01415.14
7.2.210.0040.01114.87
7.2.200.0110.00715.13
7.2.190.0100.00714.99
7.2.180.0030.01215.18
7.2.170.0070.01015.04
7.2.160.0040.01114.88
7.2.150.0080.01117.09
7.2.140.0170.00017.02
7.2.130.0070.01116.82
7.2.120.0060.00916.84
7.2.110.0030.01416.88
7.2.100.0060.00916.66
7.2.90.0090.00617.03
7.2.80.0040.01117.00
7.2.70.0100.00617.08
7.2.60.0090.00617.09
7.2.50.0100.00317.09
7.2.40.0060.01016.93
7.2.30.0130.00016.93
7.2.20.0070.00717.01
7.2.10.0030.01416.84
7.2.00.0060.00818.22
7.1.330.0120.00615.71
7.1.320.0060.01015.94
7.1.310.0070.00715.95
7.1.300.0030.00715.75
7.1.290.0000.01815.79
7.1.280.0100.00615.81
7.1.270.0070.00715.67
7.1.260.0030.01215.81
7.1.250.0060.00315.83
7.1.70.0000.01016.91
7.1.60.0060.01919.21
7.1.50.0060.01916.95
7.1.00.0030.05322.50
7.0.200.0110.00315.04
7.0.140.0030.07321.96
7.0.120.0030.06722.16
7.0.60.0070.03720.02
7.0.50.0070.05317.92
7.0.40.0130.07320.22
7.0.30.0200.04720.02
7.0.20.0270.08320.18
7.0.10.0230.06720.16
7.0.00.0070.08320.18
5.6.280.0070.07320.91
5.6.210.0030.07320.50
5.6.200.0100.03718.21
5.6.190.0030.05020.67
5.6.180.0230.05020.36
5.6.170.0230.04020.48
5.6.160.0100.08720.38
5.6.150.0070.06718.21
5.6.140.0070.05318.18
5.6.130.0000.08018.12
5.6.120.0070.05021.14
5.6.110.0030.06720.96
5.6.100.0170.03020.96
5.6.90.0030.04321.12
5.6.80.0070.06020.37
5.6.70.0330.07020.47
5.5.350.0200.08720.49
5.5.340.0070.05718.04
5.5.330.0000.04720.56
5.5.320.0070.07720.13
5.5.310.0230.04020.29
5.5.300.0100.05718.01
5.5.290.0070.08718.02
5.5.280.0100.05020.80
5.5.270.0130.07020.79
5.5.260.0100.04720.95
5.5.250.0070.08320.58
5.5.240.0030.04020.25
5.4.450.0170.07719.12
5.4.440.0070.06019.50
5.4.430.0130.07019.50
5.4.420.0030.04719.13
5.4.410.0100.06719.34
5.4.400.0100.05019.09
5.4.390.0170.07318.79
5.4.380.0070.07318.92
5.4.370.0030.08019.14
5.4.360.0100.07019.18
5.4.350.0170.07319.03
5.4.340.0130.07019.08
5.4.320.0100.03719.08
5.4.310.0070.05719.11
5.4.300.0100.07719.14
5.4.290.0030.07719.11
5.4.280.0070.03718.95
5.4.270.0000.04719.14
5.4.260.0030.08018.79
5.4.250.0070.07019.17
5.4.240.0100.07019.16
5.4.230.0070.05719.07
5.4.220.0100.05318.78
5.4.210.0130.07318.79
5.4.200.0170.04318.78
5.4.190.0100.07319.07
5.4.180.0100.07319.16
5.4.170.0170.04019.07
5.4.160.0000.07019.09
5.4.150.0070.07019.15
5.4.140.0070.07716.44
5.4.130.0070.08016.24
5.4.120.0070.07716.16
5.4.110.0100.07316.59
5.4.100.0130.06716.36
5.4.90.0070.07016.23
5.4.80.0100.07316.27
5.4.70.0070.07316.29
5.4.60.0100.07316.58
5.4.50.0030.07716.38
5.4.40.0070.04016.21
5.4.30.0030.04016.21
5.4.20.0200.04716.29
5.4.10.0070.04316.12
5.4.00.0100.05715.66
5.3.290.0070.04314.64
5.3.280.0070.04714.41
5.3.270.0070.08014.58
5.3.260.0130.07314.53
5.3.250.0030.05314.55
5.3.240.0170.06314.54
5.3.230.0070.03714.69
5.3.220.0000.08314.66
5.3.210.0000.05014.36
5.3.200.0100.04314.58
5.3.190.0030.07314.50
5.3.180.0130.08314.50
5.3.170.0100.07014.58
5.3.160.0070.05314.35
5.3.150.0030.08014.54
5.3.140.0070.05014.49
5.3.130.0070.07314.43
5.3.120.0100.08014.56
5.3.110.0000.06014.64
5.3.100.0100.07714.13
5.3.90.0070.06713.91
5.3.80.0070.04713.98
5.3.70.0100.07313.96
5.3.60.0100.03713.94
5.3.50.0070.06313.87
5.3.40.0100.05713.87
5.3.30.0100.07013.70
5.3.20.0070.06713.62
5.3.10.0100.03713.47
5.3.00.0070.04713.43
5.2.170.0030.07011.16
5.2.160.0070.03011.16
5.2.150.0070.06011.13
5.2.140.0000.03311.02
5.2.130.0100.05011.04
5.2.120.0030.03310.93
5.2.110.0100.05311.04
5.2.100.0100.06010.98
5.2.90.0070.03011.08
5.2.80.0070.06311.03
5.2.70.0100.03311.07
5.2.60.0070.05710.99
5.2.50.0030.07010.98
5.2.40.0100.05710.92
5.2.30.0100.06010.93
5.2.20.0000.07010.95
5.2.10.0000.06711.03
5.2.00.0070.04710.80
5.1.60.0100.0379.96
5.1.50.0030.05710.14
5.1.40.0000.0309.96
5.1.30.0030.02710.42
5.1.20.0030.05710.37
5.1.10.0030.05010.15
5.1.00.0030.03310.04
5.0.50.0000.0378.52
5.0.40.0000.0308.40
5.0.30.0000.0538.36
5.0.20.0000.0378.21
5.0.10.0030.0338.16
5.0.00.0030.0638.25
4.4.90.0030.0177.75
4.4.80.0030.0237.75
4.4.70.0030.0377.75
4.4.60.0070.0377.75
4.4.50.0000.0407.75
4.4.40.0030.0337.75
4.4.30.0000.0237.75
4.4.20.0030.0437.75
4.4.10.0000.0237.75
4.4.00.0030.0507.75
4.3.110.0030.0407.75
4.3.100.0000.0237.75
4.3.90.0000.0307.75
4.3.80.0000.0637.75
4.3.70.0000.0307.75
4.3.60.0030.0307.75
4.3.50.0000.0307.75
4.3.40.0000.0307.75
4.3.30.0000.0477.75
4.3.20.0070.0377.75
4.3.10.0000.0307.75
4.3.00.0000.0337.75

preferences:
35.83 ms | 401 KiB | 5 Q