3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function bar() { $nothing = isset($this) ? 'Instance' : 'Class', "\n"; } } class Baz { function test() { $objDateTime = new DateTime('NOW'); echo 'Baz->test()::DEBUT: ' . $objDateTime->format('c'); for($index=1; $index <10000; $index++) { Foo::bar(); } $objDateTime = new DateTime('NOW'); echo 'Baz->test()::FIN: ' . $objDateTime->format('c'); } } $baz = new Baz; $baz->test(); class FooPropre { public static function barPropre() { $nothing = isset($this) ? 'Instance' : 'Class', "\n"; } } class BazPropre { function testPropre() { $objDateTime = new DateTime('NOW'); echo 'BazPropre->testPropre()::DEBUT: ' . $objDateTime->format('c'); for($index=1; $index <10000; $index++) { FooPropre::barPropre(); } $objDateTime = new DateTime('NOW'); echo 'BazPropre->testPropre()::FIN: ' . $objDateTime->format('c'); } } $baz = new BazPropre; $baz->testPropre();

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.230.0150.04712.40
5.4.220.0090.04112.39
5.4.210.0110.04212.39
5.4.200.0110.04112.39
5.4.190.0090.04312.39
5.4.180.0100.04012.39
5.4.170.0110.03912.40
5.4.160.0090.04212.39
5.4.150.0120.03912.39
5.4.140.0130.04012.08
5.4.130.0090.04112.06
5.4.120.0090.04112.03
5.4.110.0110.04012.02
5.4.100.0110.03912.02
5.4.90.0120.04012.02
5.4.80.0110.04412.03
5.4.70.0140.04112.02
5.4.60.0110.03812.02
5.4.50.0080.04112.02
5.4.40.0090.04412.01
5.4.30.0090.04212.00
5.4.20.0110.04912.00
5.4.10.0170.05412.01
5.4.00.0100.03911.50
5.3.280.0100.04312.71
5.3.270.0120.04112.72
5.3.260.0100.04312.72
5.3.250.0120.04212.72
5.3.240.0100.04212.72
5.3.230.0110.04612.71
5.3.220.0110.04612.68
5.3.210.0120.04212.68
5.3.200.0120.04712.68
5.3.190.0100.04712.68
5.3.180.0130.04412.67
5.3.170.0100.04312.67
5.3.160.0140.03912.67
5.3.150.0130.04112.67
5.3.140.0110.04312.66
5.3.130.0160.06112.66
5.3.120.0160.05012.66
5.3.110.0110.04512.66
5.3.100.0180.05612.12
5.3.90.0130.04012.10
5.3.80.0150.04012.09
5.3.70.0110.04112.09
5.3.60.0120.04012.07
5.3.50.0140.04912.02
5.3.40.0110.04012.02
5.3.30.0110.04011.98
5.3.20.0140.04611.76
5.3.10.0100.04011.73
5.3.00.0100.04611.71

preferences:
142.48 ms | 1394 KiB | 7 Q