3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = null; $var = new stdClass(); $time1 = microtime(true); for ($i = 0; $i <= 1000000; $i++) { if (!$var) {} } $time1 = microtime(true) - $time1; echo "Time using '!': $time\n"; $time2 = microtime(true); for ($i = 0; $i <= 1000000; $i++) { if ($var === null) {} } $time2 = microtime(true) - $time2; echo "Time using '===': $time\n"; if ($time1 > $time2) echo '"===" was faster'; else echo '"!" 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.3.10.0100.03016.68
7.3.00.0000.04016.85
7.2.130.0030.04116.86
7.2.120.0030.05416.80
7.2.110.0070.03916.95
7.2.100.0090.04117.01
7.2.90.0070.03617.06
7.2.80.0070.03116.86
7.2.70.0060.04316.90
7.2.60.0070.03616.81
7.2.50.0060.03916.96
7.2.40.0030.04316.87
7.2.30.0130.03516.93
7.2.20.0110.03516.93
7.2.10.0070.03717.02
7.2.00.0100.03317.00
7.1.250.0030.10815.86
7.1.70.0100.03617.30
7.1.60.0160.06619.82
7.1.50.0070.07916.98
7.1.00.0000.12022.31
7.0.200.0030.04116.88
7.0.140.0100.10721.96
7.0.80.0500.10719.94
7.0.70.0100.12020.01
7.0.60.0500.10019.96
7.0.50.0570.11020.29
7.0.40.0170.10720.05
7.0.30.0130.12020.13
7.0.20.0100.07020.05
7.0.10.0100.11320.10
7.0.00.0030.07720.12
5.6.280.0070.16721.12
5.6.230.0100.11320.59
5.6.220.0030.13720.48
5.6.210.0000.17020.56
5.6.200.0130.19721.04
5.6.190.0000.16321.03
5.6.180.0200.12021.05
5.6.170.0030.18721.07
5.6.160.0070.11720.93
5.6.150.0070.11720.96
5.6.140.0100.11321.07
5.6.130.0030.12021.17
5.6.120.0000.12321.10
5.6.110.0070.11721.07
5.6.100.0030.12021.09
5.6.90.0100.11720.99
5.6.80.0000.12020.39
5.6.70.0070.11320.48
5.6.60.0100.09020.32
5.6.50.0030.11720.38
5.6.40.0030.11020.35
5.6.30.0030.12720.40
5.6.20.0030.13720.29
5.6.10.0100.18720.38
5.6.00.0200.17020.35
5.5.370.0070.11720.50
5.5.360.0100.12320.40
5.5.350.0070.17320.47
5.5.340.0100.18720.72
5.5.330.0100.17720.79
5.5.320.0100.18320.82
5.5.310.0070.18020.91
5.5.300.0070.13020.86
5.5.290.0100.12320.79
5.5.280.0000.13720.89
5.5.270.0100.16720.74
5.5.260.0000.10020.81
5.5.250.0100.11320.54
5.5.240.0030.11320.29
5.5.230.0070.11720.15
5.5.220.0100.11720.16
5.5.210.0030.11320.29
5.5.200.0170.10020.15
5.5.190.0070.16720.10
5.5.180.0000.19720.18
5.5.160.0000.13320.23
5.5.150.0070.19020.10
5.5.140.0130.16320.19
5.5.130.0070.11720.23
5.5.120.0000.17720.25
5.5.110.0030.11720.07
5.5.100.0100.16320.11
5.5.90.0130.17719.94
5.5.80.0130.16720.14
5.5.70.0100.11720.05
5.5.60.0070.15020.05
5.5.50.0000.12019.99
5.5.40.0070.13720.07
5.5.30.0000.14020.07
5.5.20.0070.17720.04
5.5.10.0070.14019.99
5.5.00.0130.16720.05
5.4.450.0030.12019.37
5.4.440.0000.12019.22
5.4.430.0030.11719.34
5.4.420.0070.12019.35
5.4.410.0100.16319.32
5.4.400.0070.09019.12
5.4.390.0000.12019.11
5.4.380.0070.11019.03
5.4.370.0170.10319.13
5.4.360.0000.11018.80
5.4.350.0000.11719.18
5.4.340.0070.16019.23
5.4.320.0130.16019.04
5.4.310.0130.11719.23
5.4.300.0170.18019.09
5.4.290.0030.17019.03
5.4.280.0100.18019.07
5.4.270.0030.13019.07
5.4.260.0070.14318.94
5.4.250.0030.18719.04
5.4.240.0030.18319.09
5.4.230.0070.11319.11
5.4.220.0100.14019.02
5.4.210.0100.17719.13
5.4.200.0100.10718.97
5.4.190.0030.17718.96
5.4.180.0130.12319.05
5.4.170.0000.17319.11
5.4.160.0000.13319.07
5.4.150.0030.12319.13
5.4.140.0100.12716.27
5.4.130.0070.10716.32
5.4.120.0030.11016.14
5.4.110.0070.14716.31
5.4.100.0070.16316.23
5.4.90.0070.12316.32
5.4.80.0030.14316.41
5.4.70.0070.18316.41
5.4.60.0030.15316.38
5.4.50.0100.15016.30
5.4.40.0030.15016.33
5.4.30.0100.10716.20
5.4.20.0170.14316.23
5.4.10.0030.16716.33
5.4.00.0000.12315.80
5.3.290.0000.20314.57
5.3.280.0100.17714.57
5.3.270.0100.18714.43
5.3.260.0100.17714.61
5.3.250.0030.18714.61
5.3.240.0100.18014.46
5.3.230.0070.12314.55
5.3.220.0130.19314.57
5.3.210.0000.18714.43
5.3.200.0100.18314.42
5.3.190.0000.15314.48
5.3.180.0070.15714.55
5.3.170.0000.15314.54
5.3.160.0000.15014.39
5.3.150.0130.15314.42
5.3.140.0100.14714.55
5.3.130.0000.20314.50
5.3.120.0070.13314.54
5.3.110.0030.19314.54
5.3.100.0100.14014.02
5.3.90.0170.17014.01
5.3.80.0000.12713.87
5.3.70.0070.20313.97
5.3.60.0030.19313.76
5.3.50.0070.19013.93
5.3.40.0070.14313.81
5.3.30.0130.17013.86
5.3.20.0100.19313.66
5.3.10.0000.12713.63
5.3.00.0070.16713.63
5.2.170.0070.15012.30
5.2.160.0000.20712.30
5.2.150.0000.18712.30
5.2.140.0000.15712.30
5.2.130.0000.22312.30
5.2.120.0030.17712.30
5.2.110.0070.20712.30
5.2.100.0100.21012.30
5.2.90.0030.13712.30
5.2.80.0000.14312.30
5.2.70.0030.14012.30
5.2.60.0000.21012.30
5.2.50.0030.16312.30
5.2.40.0000.14012.30
5.2.30.0070.20012.30
5.2.20.0030.24712.30
5.2.10.0030.20012.30
5.2.00.0000.14712.30
5.1.60.0000.16012.30
5.1.50.0070.16312.30
5.1.40.0000.15312.30
5.1.30.0030.17712.30
5.1.20.0030.18712.30
5.1.10.0030.21712.30
5.1.00.0070.16312.30
5.0.50.0070.35312.30
5.0.40.0000.35312.30
5.0.30.0070.31312.30
5.0.20.0000.30712.30
5.0.10.0030.34712.30
5.0.00.0000.29712.30
4.4.90.0030.32312.30
4.4.80.0000.32712.30
4.4.70.0030.31712.30
4.4.60.0000.33012.30
4.4.50.0000.27312.30
4.4.40.0000.34312.30
4.4.30.0000.28312.30
4.4.20.0030.34012.30
4.4.10.0000.36012.30
4.4.00.0000.33312.30
4.3.110.0000.26312.30
4.3.100.0000.26312.30
4.3.90.0070.30712.30
4.3.80.0000.30712.30
4.3.70.0030.32012.30
4.3.60.0030.34012.30
4.3.50.0000.29312.30
4.3.40.0000.30312.30
4.3.30.0000.28712.30
4.3.20.0000.34012.30
4.3.10.0000.32312.30
4.3.00.0030.32712.30

preferences:
33.69 ms | 400 KiB | 5 Q