3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { public function callStatic() { static::doIt(); } public function callNonStatic() { $this->doIt(); } protected static function doIt() { $a = 1; } } $obj = new test(); $time_start = microtime(true); for($i=0;$i<1000000;$i++) { $obj->callStatic(); } $time_end = microtime(true); $time1 = $time_end - $time_start; print "Total execution time is for static call is $time1\n"; $time_start = microtime(true); for($i=0;$i<1000000;$i++) { $obj->callNonStatic(); } $time_end = microtime(true); $time1 = $time_end - $time_start; print "Total execution time is for non static call is $time1\n" ?>

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.0070.16614.33
7.3.110.0070.16114.82
7.3.100.0030.14514.88
7.3.90.0100.14414.74
7.3.80.0030.13915.01
7.3.70.0000.16514.50
7.3.60.0100.18314.76
7.3.50.0070.14814.59
7.3.40.0030.18114.71
7.3.30.0070.15814.85
7.3.20.0100.13516.63
7.3.10.0120.15316.68
7.3.00.0020.17916.54
7.2.240.0030.24215.18
7.2.230.0130.15014.78
7.2.220.0070.17414.81
7.2.210.0000.16114.89
7.2.200.0030.16014.93
7.2.190.0030.15615.04
7.2.180.0000.14914.74
7.2.170.0070.17015.14
7.2.160.0070.18214.93
7.2.150.0070.15816.69
7.2.140.0130.14516.80
7.2.130.0050.17416.94
7.2.120.0070.15016.69
7.2.110.0150.16316.81
7.2.100.0080.16817.05
7.2.90.0080.17016.99
7.2.80.0030.15816.74
7.2.70.0050.16616.83
7.2.60.0030.16416.97
7.2.50.0080.15616.87
7.2.40.0050.16416.81
7.2.30.0100.16317.00
7.2.20.0070.16116.85
7.2.10.0070.15716.86
7.2.00.0070.14317.80
7.1.330.0030.28415.62
7.1.320.0070.34615.53
7.1.310.0030.27215.58
7.1.300.0100.25415.82
7.1.290.0130.28215.64
7.1.280.0030.29915.76
7.1.270.0030.28015.65
7.1.260.0000.26215.45
7.1.250.0120.29015.69
7.1.70.0070.11316.96
7.1.60.0160.16420.03
7.1.50.0070.18316.92
7.1.00.0070.21322.43
7.0.200.0030.14016.85
7.0.60.0000.20020.06
7.0.50.0030.15017.92
7.0.40.0100.20320.13
7.0.30.0100.19720.24
7.0.20.0200.17020.23
7.0.10.0230.18720.06
7.0.00.0030.17020.13
5.6.280.0000.30721.03
5.6.210.0070.28320.67
5.6.200.0000.29718.27
5.6.190.0200.34320.63
5.6.180.0070.32720.55
5.6.170.0270.35320.39
5.6.160.0000.31320.57
5.6.150.0000.30318.18
5.6.140.0030.29018.17
5.6.130.0070.35018.18
5.6.120.0100.28321.01
5.6.110.0070.35720.98
5.6.100.0070.31021.11
5.6.90.0100.30021.13
5.6.80.0070.34720.37
5.6.70.0230.36720.40
5.5.350.0000.28020.50
5.5.340.0070.29718.07
5.5.330.0030.35720.42
5.5.320.0070.28320.28
5.5.310.0300.28720.23
5.5.300.0030.29018.06
5.5.290.0070.29318.08
5.5.280.0030.28020.74
5.5.270.0070.35320.87
5.5.260.0030.30020.80
5.5.250.0070.35320.50
5.5.240.0100.30020.25
5.4.450.0570.45319.48
5.4.440.0230.46719.55
5.4.430.0630.56019.64
5.4.420.0730.50319.38
5.4.410.0630.61319.46
5.4.400.0700.43318.88
5.4.390.0630.42719.15
5.4.380.0700.44019.13
5.4.370.0770.43319.38
5.4.360.0800.60019.06
5.4.350.0530.43719.13
5.4.340.0630.42018.87
5.4.320.0770.47019.31
5.4.310.0830.45719.00
5.4.300.0700.50719.28
5.4.290.0630.43718.88
5.4.280.0800.41318.98
5.4.270.0500.53019.12
5.4.260.0400.42718.86
5.4.250.0700.71019.14
5.4.240.0870.48018.97
5.4.230.0500.65718.87
5.4.220.0730.45019.25
5.4.210.0430.44718.97
5.4.200.0700.55716.88
5.4.190.0600.43318.95
5.4.180.0170.43319.13
5.4.170.0200.42719.23
5.4.160.0170.47019.25
5.4.150.0130.57019.21
5.4.140.0230.44316.43
5.4.130.0430.46316.32
5.4.120.0100.54716.70
5.4.110.0630.42716.38
5.4.100.0400.45716.65
5.4.90.0470.50016.53
5.4.80.0500.54016.29
5.4.70.0670.46716.27
5.4.60.0630.59316.52
5.4.50.0930.46016.52
5.4.40.0600.42716.42
5.4.30.0770.56716.49
5.4.20.0500.52316.38
5.4.10.0430.41016.50
5.4.00.0430.44015.87

preferences:
27.68 ms | 401 KiB | 5 Q