3v4l.org

run code in 300+ PHP versions simultaneously
<?php function no_suppress() { $a = 0; $b = new stdClass; $a = (isset($b->asdf) ? $b->asdf : null); } function suppress() { $a = 0; $b = new stdClass; $a = @$b->asdf ? $b->asdf : null; } function do_test($suppress = false, $loops = 1000000) { if($suppress) { echo "starting suppress...\n"; $start = microtime(true); for($i = 0; $i < $loops; $i++) { suppress(); } $end = microtime(true); } else { echo "starting no_suppress...\n"; $start = microtime(true); for($i = 0; $i < $loops; $i++) { no_suppress(true); } $end = microtime(true); } echo "ended: " . ($end - $start) . "\n"; } do_test(true, 10000); do_test(false, 10000);

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.0100.01314.91
7.3.110.0070.01514.83
7.3.100.0000.01914.84
7.3.90.0110.01114.95
7.3.80.0100.01014.59
7.3.70.0030.01315.05
7.3.60.0040.01514.73
7.3.50.0060.01514.66
7.3.40.0070.01414.73
7.3.30.0030.01414.91
7.3.20.0030.01216.82
7.3.10.0040.01116.78
7.3.00.0090.01216.54
7.2.240.0040.01415.20
7.2.230.0030.01714.91
7.2.220.0100.01015.21
7.2.210.0060.01515.20
7.2.200.0030.01614.98
7.2.190.0070.01715.24
7.2.180.0070.01415.09
7.2.170.0030.01715.16
7.2.160.0060.01615.10
7.2.150.0040.01816.59
7.2.140.0070.01317.10
7.2.130.0030.01717.11
7.2.120.0030.01717.00
7.2.110.0040.01816.91
7.2.100.0060.01516.70
7.2.90.0000.02217.23
7.2.80.0030.01816.94
7.2.70.0000.02116.75
7.2.60.0000.02316.96
7.2.50.0090.00917.08
7.2.40.0030.01716.99
7.2.30.0060.01216.86
7.2.20.0030.01716.61
7.2.10.0120.00917.15
7.2.00.0030.01718.19
7.1.330.0130.01015.97
7.1.320.0100.01315.91
7.1.310.0070.01715.89
7.1.300.0070.01715.64
7.1.290.0090.00915.74
7.1.280.0040.01815.69
7.1.270.0060.01515.80
7.1.260.0070.01615.91
7.1.250.0000.02115.59
7.1.70.0040.00817.33
7.1.60.0070.02519.21
7.1.50.0130.02016.93
7.1.00.0030.03722.50
7.0.200.0490.01315.10
7.0.140.0130.07321.92
7.0.120.0070.06322.02
7.0.60.0070.08020.04
7.0.50.0100.08317.83
7.0.40.0070.05720.23
7.0.30.0230.04020.20
7.0.20.0330.08720.23
7.0.10.0100.04020.22
7.0.00.0000.05020.16
5.6.280.0070.08320.86
5.6.210.0030.04720.48
5.6.200.0030.07718.19
5.6.190.0130.08320.57
5.6.180.3570.05020.68
5.6.170.0230.04020.48
5.6.160.0100.04720.76
5.6.150.0130.08718.19
5.6.140.0030.10018.15
5.6.130.0070.09318.27
5.6.120.0070.09721.00
5.6.110.0170.09021.04
5.6.100.0030.05021.02
5.6.90.0270.08321.06
5.6.80.0100.09020.49
5.6.70.0070.09320.53
5.5.350.0130.09720.33
5.5.340.0000.08318.04
5.5.330.0000.05320.57
5.5.320.0270.06020.30
5.5.310.0200.08720.27
5.5.300.0130.08318.13
5.5.290.0030.05717.95
5.5.280.0000.05320.98
5.5.270.0070.06320.90
5.5.260.0070.07720.78
5.5.250.0100.09020.63
5.5.240.0200.06720.17
5.4.450.0070.07719.57
5.4.440.0030.06319.20
5.4.430.0030.05019.58
5.4.420.0030.05019.47
5.4.410.0070.04719.20
5.4.400.0070.05019.25
5.4.390.0100.08319.08
5.4.380.0000.09319.25
5.4.370.0070.07019.16
5.4.360.0070.08019.00
5.4.350.0070.07019.12
5.4.340.0030.09319.08
5.4.320.0100.08719.24
5.4.310.0100.06719.14
5.4.300.0070.07318.92
5.4.290.0070.08319.24
5.4.280.0070.08718.84
5.4.270.0070.05019.14
5.4.260.0030.05019.20
5.4.250.0070.08019.23
5.4.240.0070.04719.11
5.4.230.0030.04719.23
5.4.220.0070.08319.19
5.4.210.0130.07718.84
5.4.200.0000.06718.97
5.4.190.0100.08718.84
5.4.180.0070.06019.13
5.4.170.0030.06719.13
5.4.160.0070.05019.12
5.4.150.0070.09318.84
5.4.140.0070.08016.55
5.4.130.0030.09016.41
5.4.120.0100.08716.34
5.4.110.0170.03716.50
5.4.100.0030.08016.46
5.4.90.0030.09016.44
5.4.80.0000.04716.48
5.4.70.0030.04316.41
5.4.60.0070.09016.25
5.4.50.0070.07016.64
5.4.40.0030.04316.43
5.4.30.0030.04316.37
5.4.20.0000.05316.39
5.4.10.0070.09316.27
5.4.00.0070.08315.92
5.3.290.0000.06714.68
5.3.280.0030.05714.67
5.3.270.0070.07714.64
5.3.260.0130.08714.61
5.3.250.0070.09314.64
5.3.240.0030.06014.61
5.3.230.0070.09314.61
5.3.220.0100.09314.57
5.3.210.0030.10014.57
5.3.200.0030.07714.63
5.3.190.0170.09014.72
5.3.180.0000.07314.64
5.3.170.0030.04714.57
5.3.160.0000.07714.48
5.3.150.0100.09014.58
5.3.140.0070.05714.62
5.3.130.0070.06014.56
5.3.120.0070.08014.48
5.3.110.0100.09314.61
5.3.100.0070.09314.11
5.3.90.0030.05014.04
5.3.80.0100.08314.08
5.3.70.0170.08014.08
5.3.60.0070.09313.98
5.3.50.0070.09014.10
5.3.40.0030.09713.94
5.3.30.0170.06013.88
5.3.20.0070.05013.70
5.3.10.0070.08713.61
5.3.00.0100.07713.64
5.2.170.0030.05311.15
5.2.160.0070.07011.19
5.2.150.0030.08311.05
5.2.140.0030.08011.12
5.2.130.0100.06011.08
5.2.120.0000.06711.16
5.2.110.0070.08011.11
5.2.100.0070.08011.04
5.2.90.0030.08011.16
5.2.80.0130.06711.05
5.2.70.0030.04311.06
5.2.60.0070.08011.10
5.2.50.0000.08711.06
5.2.40.0030.07711.08
5.2.30.0000.06311.03
5.2.20.0100.07310.98
5.2.10.0100.07710.79
5.2.00.0030.04010.65
5.1.60.0070.0709.98
5.1.50.0000.08710.05
5.1.40.0000.0809.89
5.1.30.0070.06710.31
5.1.20.0070.08310.40
5.1.10.0070.08010.05
5.1.00.0100.04710.22
5.0.50.0070.0678.51
5.0.40.0030.0438.51
5.0.30.0130.0808.51
5.0.20.0000.0578.51
5.0.10.0070.0508.51
5.0.00.0030.0478.51
4.4.90.0000.0678.51
4.4.80.0000.0678.51
4.4.70.0030.0678.51
4.4.60.0000.0678.51
4.4.50.0070.0708.51
4.4.40.0030.0578.51
4.4.30.0030.0438.51
4.4.20.0100.0478.51
4.4.10.0030.0478.51
4.4.00.0030.0678.51
4.3.110.0000.0408.51
4.3.100.0070.0608.51
4.3.90.0000.0678.51
4.3.80.0000.0808.51
4.3.70.0000.0678.51
4.3.60.0000.0338.51
4.3.50.0000.0438.51
4.3.40.0000.0678.51
4.3.30.0000.0378.51
4.3.20.0030.0308.51
4.3.10.0030.0308.51
4.3.00.0030.0678.51

preferences:
40.05 ms | 401 KiB | 5 Q