3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SomeClass { static function doTest($var) {return $var;} } class SomeObj { function doTest($var) {return $var;} static function doTest2($var) {return $var;} } //bench static call $starttime = microtime(true); for ($i = 0; $i< 100000; $i++) SomeClass::doTest($i); echo "Static call time: " , (microtime(true)-$starttime) , " ms "; //bench object method $starttime = microtime(true); $obj = new SomeObj(); for ($i = 0; $i< 100000; $i++) $obj->doTest($i); echo "Object method call time: " , (microtime(true)-$starttime) , " ms "; //bench static call $starttime = microtime(true); for ($i = 0; $i< 100000; $i++) SomeObj::doTest2($i); echo "Static call (when the static is in the same class of object method) time: " , (microtime(true)-$starttime) , " ms ";

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.40.0070.03316.52
7.4.00.0030.02814.76
7.3.120.0070.02314.68
7.3.110.0040.02214.91
7.3.100.0130.01314.68
7.3.90.0030.02014.72
7.3.80.0060.01315.05
7.3.70.0060.01514.75
7.3.60.0100.01614.57
7.3.50.0070.01714.77
7.3.40.0070.01314.77
7.3.30.0070.01414.81
7.3.20.0030.02216.69
7.3.10.0100.00716.69
7.3.00.0060.01616.63
7.2.250.0060.02615.12
7.2.240.0030.02715.36
7.2.230.0110.01414.93
7.2.220.0000.02215.04
7.2.210.0070.01715.03
7.2.200.0100.01314.96
7.2.190.0030.02014.93
7.2.180.0030.01614.84
7.2.170.0070.01415.14
7.2.160.0000.02615.20
7.2.150.0070.01716.77
7.2.140.0060.01916.70
7.2.130.0000.02116.95
7.2.120.0120.01217.06
7.2.110.0040.01817.03
7.2.100.0100.01417.04
7.2.90.0030.02116.75
7.2.80.0060.01617.02
7.2.70.0040.01817.05
7.2.60.0060.01617.12
7.2.50.0060.01816.98
7.2.40.0090.01617.12
7.2.30.0070.01616.83
7.2.20.0000.02216.99
7.2.10.0000.02516.70
7.2.00.0030.02318.15
7.1.330.0070.03716.08
7.1.320.0000.03715.86
7.1.310.0000.03215.96
7.1.300.0030.03815.62
7.1.290.0070.03215.81
7.1.280.0000.04015.84
7.1.270.0070.03515.84
7.1.260.0030.03315.50
7.1.250.0070.02815.83
7.1.240.0040.03115.61
7.1.230.0000.03115.79
7.1.220.0060.02815.55
7.1.210.0000.03615.80
7.1.200.0070.03015.61
7.1.190.0040.03515.83
7.1.180.0030.03315.56
7.1.170.0090.02815.80
7.1.160.0030.03515.57
7.1.150.0100.02715.79
7.1.140.0130.02515.67
7.1.130.0030.03415.67
7.1.120.0000.04215.88
7.1.110.0030.03515.91
7.1.100.0030.03615.85
7.1.90.0000.03715.79
7.1.80.0090.02815.67
7.1.70.0050.02216.58
7.1.60.0080.03317.54
7.1.50.0070.02416.40
7.1.40.0040.03515.89
7.1.30.0000.03815.74
7.1.20.0070.04115.85
7.1.10.0030.03515.75
7.1.00.0020.04219.12
7.0.330.0030.02915.41
7.0.320.0070.02815.47
7.0.310.0030.03715.43
7.0.300.0030.02715.43
7.0.290.0030.03615.40
7.0.280.0070.03015.48
7.0.270.0060.02915.41
7.0.260.0030.03715.41
7.0.250.0030.03315.48
7.0.240.0030.03515.22
7.0.230.0030.03515.60
7.0.220.0030.02815.25
7.0.210.0100.02915.64
7.0.200.0150.02514.88
7.0.190.0090.02915.53
7.0.180.0070.03415.30
7.0.170.0100.02915.16
7.0.160.0030.03515.54
7.0.150.0030.03815.33
7.0.140.0050.06118.73
7.0.130.0100.03015.54
7.0.120.0130.03115.16
7.0.110.0030.03415.50
7.0.100.0070.03315.52
7.0.90.0100.03215.38
7.0.80.0030.03815.53
7.0.70.0030.03815.50
7.0.60.0100.04017.74
7.0.50.0050.04216.71
7.0.40.0080.06616.89
7.0.30.0180.04116.84
7.0.20.0100.04616.84
7.0.10.0120.04116.84
7.0.00.0120.06416.88
5.6.400.0100.06814.39
5.6.390.0000.07314.49
5.6.380.0070.06714.40
5.6.370.0070.08014.35
5.6.360.0000.07514.52
5.6.350.0000.08214.27
5.6.340.0030.07414.54
5.6.330.0030.07114.53
5.6.320.0030.07614.27
5.6.310.0070.07314.59
5.6.300.0070.07114.33
5.6.290.0000.07314.48
5.6.280.0080.09317.61
5.6.270.0070.07614.52
5.6.260.0070.06914.28
5.6.250.0070.07114.16
5.6.240.0030.07314.30
5.6.230.0100.07314.42
5.6.220.0100.06714.24
5.6.210.0080.09717.43
5.6.200.0030.10016.21
5.6.190.0070.09417.46
5.6.180.1930.06917.47
5.6.170.0120.07517.50
5.6.160.0100.08717.35
5.6.150.0100.09116.18
5.6.140.0100.09316.24
5.6.130.0070.08316.11
5.6.120.0070.09317.65
5.6.110.0200.08117.57
5.6.100.0070.09217.57
5.6.90.0100.09417.71
5.6.80.0080.08817.39
5.6.70.1600.06617.24
5.6.60.0070.06714.24
5.6.50.0060.07514.57
5.6.40.0030.07514.61
5.6.30.0070.06714.18
5.6.20.0030.07614.10
5.6.10.0070.06814.02
5.6.00.0030.07114.22
5.5.380.0060.07114.29
5.5.370.0030.07114.30
5.5.360.0030.07514.42
5.5.350.0000.09417.32
5.5.340.0050.10115.97
5.5.330.0070.09217.19
5.5.320.0150.06817.31
5.5.310.0200.07717.40
5.5.300.0080.08716.26
5.5.290.0030.07016.21
5.5.280.0050.09017.55
5.5.270.0050.07217.58
5.5.260.0070.09617.34
5.5.250.0070.06717.45
5.5.240.0180.07417.32
5.5.230.0030.07214.43
5.5.220.0060.06414.18
5.5.210.0070.07214.02
5.5.200.0060.06813.81
5.5.190.0000.09514.33
5.5.180.0030.08514.08
5.5.170.0030.07814.17
5.5.160.0070.07214.24
5.5.150.0030.08013.95
5.5.140.0030.07414.16
5.5.130.0070.06814.38
5.5.120.0070.07914.15
5.5.110.0100.06614.38
5.5.100.0070.07114.40
5.5.90.0060.07414.30
5.5.80.0070.07514.31
5.5.70.0000.07214.05
5.5.60.0100.06914.34
5.5.50.0070.07014.07
5.5.40.0030.07014.30
5.5.30.0100.06814.16
5.5.20.0000.08114.24
5.5.10.0000.07814.28
5.5.00.0030.07614.45
5.4.450.0120.09515.33
5.4.440.0130.06515.26
5.4.430.0150.08915.34
5.4.420.0250.07715.31
5.4.410.0180.08715.36
5.4.400.0100.07715.16
5.4.390.0100.08815.04
5.4.380.0150.08315.05
5.4.370.0150.08615.07
5.4.360.0150.08414.93
5.4.350.0170.07115.15
5.4.340.0170.08914.95
5.4.330.0000.07411.14
5.4.320.0070.09315.12
5.4.310.0160.09514.89
5.4.300.0170.06915.16
5.4.290.0150.08315.22
5.4.280.0180.06615.05
5.4.270.0170.07715.12
5.4.260.0130.07815.19
5.4.250.0100.08215.05
5.4.240.0130.08915.03
5.4.230.0170.09215.09
5.4.220.0100.07415.04
5.4.210.0120.08414.96
5.4.200.0050.07615.03
5.4.190.0100.08014.91
5.4.180.0100.08315.10
5.4.170.0150.08615.15
5.4.160.0150.08814.96
5.4.150.0080.08614.97
5.4.140.0160.06413.77
5.4.130.0100.06613.71
5.4.120.0070.07613.80
5.4.110.0120.07613.74
5.4.100.0120.06413.76
5.4.90.0050.08313.72
5.4.80.0100.07113.79
5.4.70.0050.06713.75
5.4.60.0080.06513.74
5.4.50.0120.06713.84
5.4.40.0070.07213.88
5.4.30.0070.06813.80
5.4.20.0100.07113.56
5.4.10.0050.06813.59
5.4.00.0100.06113.57
5.3.290.0130.13714.64
5.3.280.0370.12014.75
5.3.270.0300.12314.79
5.3.260.0200.13314.66
5.3.250.0300.12014.77
5.3.240.0100.08714.72
5.3.230.0170.07714.61
5.3.220.0170.09714.58
5.3.210.0130.08314.59
5.3.200.0200.07714.62
5.3.190.0230.08014.62
5.3.180.0270.12014.81
5.3.170.0070.09314.48
5.3.160.0170.07714.59
5.3.150.0130.08014.49
5.3.140.0130.08014.80
5.3.130.0200.07714.46
5.3.120.0100.09014.63
5.3.110.0170.07714.63
5.3.100.0230.07314.02
5.3.90.0170.08014.18
5.3.80.0070.10014.14
5.3.70.0230.10714.00
5.3.60.0170.08713.94
5.3.50.0170.07313.93
5.3.40.0230.13013.94
5.3.30.0030.08014.14
5.3.20.0200.11013.63
5.3.10.0270.12713.78
5.3.00.0300.12713.87

preferences:
35.77 ms | 401 KiB | 5 Q