3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($label = '') { global $t; $t2 = microtime(1); if ($label) echo str_pad($label . ': ', 32, '.', STR_PAD_RIGHT) . ' ' . 1000 * ($t2 - $t) . 'ms' . "\n"; $t = $t2; } class Foo { public function fooLoop() { for ($i = 100000; $i--;) $this->foo(); } public function barLoop() { for ($i = 100000; $i--;) $this->bar(); } public function foo() { } protected function bar() { } } $f = new Foo(); test(); $f->fooLoop(); test('pro'); $f->barLoop(); test('pub');

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.10.0100.01716.30
7.4.00.0130.01015.67
7.3.130.0090.01616.31
7.3.120.0070.01715.68
7.3.110.0080.01515.78
7.3.100.0080.01515.60
7.3.90.0040.01715.73
7.3.80.0060.01315.65
7.3.70.0030.01415.58
7.3.60.0070.01315.55
7.3.50.0050.01115.55
7.3.40.0070.01215.73
7.3.30.0080.00915.73
7.3.20.0070.01017.48
7.3.10.0040.01317.16
7.3.00.0130.01017.05
7.2.260.0070.02016.49
7.2.250.0100.01615.88
7.2.240.0030.01915.93
7.2.230.0030.01815.90
7.2.220.0000.01915.86
7.2.210.0110.01015.86
7.2.200.0070.01215.70
7.2.190.0070.01415.74
7.2.180.0050.01415.94
7.2.170.0030.01515.86
7.2.160.0090.00815.84
7.2.150.0130.00817.71
7.2.140.0050.01817.76
7.2.130.0060.01417.40
7.2.120.0120.01017.36
7.2.110.0110.01317.45
7.2.100.0120.01417.40
7.2.90.0240.01316.78
7.2.80.0150.01116.85
7.2.70.0460.01516.76
7.2.60.0110.01416.73
7.2.50.0090.01616.72
7.2.40.0110.01216.88
7.2.30.0330.01216.81
7.2.20.0080.01316.77
7.2.10.0130.01316.73
7.2.00.0120.01116.84
7.1.330.0080.02116.61
7.1.320.0080.02016.64
7.1.310.0080.01716.75
7.1.300.0060.01816.44
7.1.290.0090.01916.62
7.1.280.0050.02116.64
7.1.270.0050.02116.49
7.1.260.0050.02316.70
7.1.250.0060.01816.35
7.1.240.0050.02116.49
7.1.230.0020.02616.49
7.1.220.0050.01916.56
7.1.210.0050.01815.63
7.1.200.0070.02115.78
7.1.190.0060.01715.76
7.1.180.0080.01815.65
7.1.170.0120.02115.73
7.1.160.0050.02015.77
7.1.150.0370.01715.60
7.1.140.0090.01715.65
7.1.130.0160.01915.71
7.1.120.0710.01715.62
7.1.110.0180.01715.70
7.1.100.0190.02015.58
7.1.90.0580.01615.75
7.1.80.0090.01615.61
7.1.70.1170.01915.76
7.1.60.0820.02021.66
7.1.50.0170.02121.72
7.1.40.0130.02121.70
7.1.30.0170.01521.58
7.1.20.1030.01921.74
7.1.10.0480.01415.66
7.1.00.0150.01915.63
7.0.330.0100.01516.08
7.0.320.0060.01616.20
7.0.310.0060.01915.37
7.0.300.0050.02015.22
7.0.290.0110.01515.23
7.0.280.0190.02015.26
7.0.270.0090.01915.17
7.0.260.0090.02215.23
7.0.250.0090.01815.14
7.0.240.0140.01815.37
7.0.230.0540.01615.15
7.0.220.0120.02115.30
7.0.210.0950.01715.27
7.0.200.0970.01515.41
7.0.190.0240.01715.29
7.0.180.0130.01215.44
7.0.170.0190.01715.33
7.0.160.0780.01715.45
7.0.150.0230.01715.23
7.0.140.0060.01815.45
7.0.130.0070.01715.34
7.0.120.0050.02015.43
7.0.110.0060.01915.34
7.0.100.0480.02015.30
7.0.90.0560.01415.29
7.0.80.0730.01915.23
7.0.70.0490.01515.46
7.0.60.0590.01715.28
7.0.50.0450.01715.27
7.0.40.0380.01713.94
7.0.30.0370.01814.02
7.0.20.0360.02214.00
7.0.10.0570.01814.05
7.0.00.0410.01514.02
5.6.400.0080.03415.04
5.6.390.0080.03615.36
5.6.380.0050.03615.29
5.6.370.0050.03415.20
5.6.360.0080.03414.91
5.6.350.0030.03215.21
5.6.340.0020.04415.06
5.6.330.0060.03615.05
5.6.320.0030.04015.11
5.6.310.0050.03715.02
5.6.300.0050.04015.28
5.6.290.0050.03215.17
5.6.280.0070.03315.27
5.6.270.0030.03915.35
5.6.260.0050.03615.10
5.6.250.0080.03415.18
5.6.240.0070.03815.07
5.6.230.0070.03315.06
5.6.220.0050.03815.00
5.6.210.0030.03815.08
5.6.200.0080.03415.06
5.6.190.0060.03315.01
5.6.180.0030.04014.93
5.6.170.0080.03615.04
5.6.160.0060.03015.37
5.6.150.0030.03315.14
5.6.140.0030.03915.16
5.6.130.0040.03915.01
5.6.120.0080.03415.23
5.6.110.0000.03915.05
5.6.100.0030.03615.15
5.6.90.0050.03315.19
5.6.80.0080.03715.03
5.6.70.0050.04114.94
5.6.60.0070.03914.98
5.6.50.0060.03515.20
5.6.40.0100.03114.97
5.6.30.0030.03715.13
5.6.20.0050.03514.92
5.6.10.0050.04515.01
5.6.00.0060.03715.11

preferences:
34.61 ms | 400 KiB | 5 Q