3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! class foo { function doSomething($a) { return $a + 2; } } $start = microtime(true); $foo = new foo(); for ($i = 0; $i < 100000; $i++) { $foo->doSomething(1); } $end1 = (microtime(true) - $start); echo $end1 . PHP_EOL; $start = microtime(true); $foo = new foo(); $doSomething = new \reflectionMethod('foo', 'doSomething'); for ($i = 0; $i < 100000; $i++) { $doSomething->invoke($foo, 1); } $end2 = (microtime(true) - $start); echo $end2 . PHP_EOL; var_dump($end2 - $end1);

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.2.00.0090.01819.18
7.1.70.0070.02917.22
7.1.60.0130.03819.33
7.1.50.0030.04816.77
7.1.00.0070.09322.55
7.0.200.0160.02316.27
7.0.140.0070.09022.09
7.0.100.0000.05320.16
7.0.90.0030.05319.96
7.0.80.0070.05019.91
7.0.70.0070.05319.84
7.0.60.0070.05020.05
7.0.50.0470.10020.36
7.0.40.0100.05720.10
7.0.30.0100.06720.08
7.0.20.0100.08019.96
7.0.10.0030.09320.13
7.0.00.0100.07720.14
5.6.280.0030.13320.82
5.6.250.0100.07320.78
5.6.240.0130.08320.51
5.6.230.0070.08020.60
5.6.220.0100.07020.71
5.6.210.0000.08020.58
5.6.200.0100.08021.13
5.6.190.0070.11321.09
5.6.180.0030.13020.96
5.6.170.0030.12020.95
5.6.160.0100.12721.06
5.6.150.0070.12321.18
5.6.140.0130.11721.05
5.6.130.0070.12021.08
5.6.120.0170.12321.17
5.6.110.0070.12321.05
5.6.100.0070.11021.02
5.6.90.0030.13320.91
5.6.80.0130.06720.43
5.6.70.0070.13320.52
5.6.60.0030.12720.30
5.6.50.0100.11020.41
5.6.40.0100.11020.40
5.6.30.0030.14020.41
5.6.20.0070.11020.41
5.6.10.0070.14020.29
5.6.00.0100.11720.41
5.5.380.0030.10020.45
5.5.370.0030.08320.50
5.5.360.0070.07020.43
5.5.350.0070.08020.39
5.5.340.0070.12320.83
5.5.330.0030.12320.93
5.5.320.0030.09720.88
5.5.310.0130.11720.91
5.5.300.0070.10720.88
5.5.290.0170.12320.88
5.5.280.0130.11020.73
5.5.270.0070.12320.88
5.5.260.0030.15320.91
5.5.250.0070.07320.74
5.5.240.0130.12020.27
5.5.230.0100.13020.14
5.5.220.0070.12320.29
5.5.210.0130.13020.30
5.5.200.0030.09720.29
5.5.190.0070.12720.24
5.5.180.0170.13020.24
5.5.160.0070.13320.23
5.5.150.0030.12720.24
5.5.140.0130.12320.18
5.5.130.0100.13019.98
5.5.120.0070.12020.21
5.5.110.0100.12020.21
5.5.100.0100.12020.18
5.5.90.0070.15720.16
5.5.80.0130.11720.09
5.5.70.0070.12719.97
5.5.60.0130.13020.05
5.5.50.0130.12020.12
5.5.40.0170.11320.05
5.5.30.0170.12020.14
5.5.20.0130.11019.91
5.5.10.0030.12720.06
5.5.00.0130.15020.08
5.4.450.0030.11319.49
5.4.440.0170.15319.51
5.4.430.0130.12019.41
5.4.420.0030.11719.45
5.4.410.0030.09019.32
5.4.400.0030.11319.17
5.4.390.0030.12719.23
5.4.380.0130.11719.13
5.4.370.0100.11018.95
5.4.360.0030.10719.17
5.4.350.0100.11719.18
5.4.340.0030.12019.09
5.4.320.0070.11719.18
5.4.310.0100.10719.21
5.4.300.0070.12719.03
5.4.290.0170.12319.18
5.4.280.0030.13019.13
5.4.270.0170.12319.05
5.4.260.0030.11719.04
5.4.250.0030.10719.02
5.4.240.0000.13319.14
5.4.230.0030.13018.84
5.4.220.0100.11019.20
5.4.210.0030.13018.95
5.4.200.0000.12318.87
5.4.190.0030.14019.11
5.4.180.0070.13019.14
5.4.170.0030.10719.21
5.4.160.0100.12019.11
5.4.150.0070.12019.14
5.4.140.0030.15016.26
5.4.130.0130.11716.33
5.4.120.0070.10016.34
5.4.110.0100.09016.50
5.4.100.0070.12016.42
5.4.90.0070.11016.55
5.4.80.0070.11716.41
5.4.70.0130.10716.44
5.4.60.0000.13016.45
5.4.50.0100.12316.44
5.4.40.0000.11716.50
5.4.30.0070.10716.47
5.4.20.0070.06716.46
5.4.10.0100.07016.45
5.4.00.0030.11715.67
5.3.290.0100.14314.79
5.3.280.0000.15314.73
5.3.270.0070.15014.73
5.3.260.0070.14014.63
5.3.250.0070.13714.70
5.3.240.0100.13714.56
5.3.230.0070.15014.65
5.3.220.0000.15714.59
5.3.210.0130.12014.63
5.3.200.0070.14714.61
5.3.190.0000.16014.71
5.3.180.0030.15714.55
5.3.170.0100.14314.69
5.3.160.0100.14714.57
5.3.150.0130.12714.49
5.3.140.0030.12314.68
5.3.130.0100.14714.48
5.3.120.0100.13314.69
5.3.110.0130.12014.61
5.3.100.0070.15313.93
5.3.90.0000.14014.11
5.3.80.0100.10714.04
5.3.70.0030.13014.14
5.3.60.0070.11714.03
5.3.50.0030.09714.05
5.3.40.0070.13014.04
5.3.30.0070.14714.05
5.3.20.0070.12713.71
5.3.10.0070.14313.66
5.3.00.0070.15013.75
5.2.170.0070.13711.27
5.2.160.0000.12011.21
5.2.150.0070.12711.15
5.2.140.0070.14311.17
5.2.130.0030.13710.98
5.2.120.0170.12311.12
5.2.110.0100.13310.96
5.2.100.0030.12311.19
5.2.90.0100.13711.00
5.2.80.0030.14711.00
5.2.70.0070.13311.15
5.2.60.0030.12311.06
5.2.50.0100.15011.08
5.2.40.0100.11710.91
5.2.30.0100.14310.84
5.2.20.0070.15010.95
5.2.10.0030.14710.97
5.2.00.0070.13010.74
5.1.60.0030.13710.09
5.1.50.0070.12710.13
5.1.40.0070.14310.07
5.1.30.0030.14310.38
5.1.20.0070.13010.50
5.1.10.0070.13710.18
5.1.00.0030.14310.21
5.0.50.0030.1778.93
5.0.40.0000.1638.93
5.0.30.0070.1778.93
5.0.20.0000.1738.93
5.0.10.0030.1638.93
5.0.00.0000.1708.93
4.4.90.0030.1038.93
4.4.80.0000.1078.93
4.4.70.0030.0838.93
4.4.60.0070.1138.93
4.4.50.0030.0978.93
4.4.40.0030.0908.93
4.4.30.0030.0978.93
4.4.20.0070.1078.93
4.4.10.0000.1078.93
4.4.00.0030.1078.93
4.3.110.0030.0778.93
4.3.100.0030.1038.93
4.3.90.0070.1008.93
4.3.80.0000.1138.93
4.3.70.0070.0878.93
4.3.60.0030.0978.93
4.3.50.0030.1038.93
4.3.40.0030.0708.93
4.3.30.0000.0978.93
4.3.20.0070.1108.93
4.3.10.0030.1078.93
4.3.00.0000.1108.93

preferences:
36.65 ms | 401 KiB | 5 Q