3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo { class Bar { public function baz() { return strlen('Regarding the overhead: Just keep in mind, that a typical application calls built-in functions many thousand times. Even if the difference is small: It exists.'); } } } $start = microtime(true); $foo = new Foo\Bar; for($x = 0; $x < 1000000; $x++) { $foo->baz(); } echo "Time: " . round((microtime(true) - $start ) / 1000000, 5) . 's';

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)
5.4.240.0140.05012.39
5.4.230.0150.05012.38
5.4.220.0130.05012.38
5.4.210.0220.07212.38
5.4.200.0160.05012.38
5.4.190.0130.04912.38
5.4.180.0150.04712.38
5.4.170.0250.08612.39
5.4.160.0120.04912.39
5.4.150.0140.04912.38
5.4.140.0140.04612.07
5.4.130.0120.05012.05
5.4.120.0100.05312.01
5.4.110.0150.04612.01
5.4.100.0150.04912.01
5.4.90.0110.05212.01
5.4.80.0150.05012.01
5.4.70.0140.05012.01
5.4.60.0140.07212.01
5.4.50.0160.04512.01
5.4.40.0090.05111.99
5.4.30.0130.04611.99
5.4.20.0200.07411.99
5.4.10.0160.04511.99
5.4.00.0150.04611.48
5.3.280.0130.05412.71
5.3.270.0130.05212.72
5.3.260.0160.05012.72
5.3.250.0140.05812.72
5.3.240.0160.07312.72
5.3.230.0120.05512.71
5.3.220.0250.06712.68
5.3.210.0130.05412.68
5.3.200.0150.04712.68
5.3.190.0150.04612.68
5.3.180.0230.06912.68
5.3.170.0160.04712.67
5.3.160.0200.05112.67
5.3.150.0120.05612.67
5.3.140.0140.04912.66
5.3.130.0170.05012.66
5.3.120.0120.05412.66
5.3.110.0170.05012.66
5.3.100.0130.05112.12
5.3.90.0220.05612.09
5.3.80.0250.06812.09
5.3.70.0180.04612.09
5.3.60.0160.04712.07
5.3.50.0160.04912.01
5.3.40.0140.04912.01
5.3.30.0090.05011.97
5.3.20.0140.04611.74
5.3.10.0120.04511.71
5.3.00.0100.04911.70

preferences:
138.87 ms | 1394 KiB | 7 Q