3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Call a static method on a string class or object returned by // an instance method call $foo->bar()::baz(); class bla { static function bar(){ static $flag = 1; $flag++; if ($flag == 2 ) { return 'blee'; } if ($flag == 3){ return new blee; } } } class blee { static function $baz() { echo "Oh, for the baz of it!\n"; } } /**********************************/ $foo = new bla; echo $foo::bar()::$baz();

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.0.10.0070.06720.10
7.0.00.0070.07720.19
5.6.160.0030.04320.54
5.6.150.0130.07318.17
5.6.140.0070.04718.18
5.6.130.0100.07718.18
5.6.120.0100.03720.99
5.6.110.0070.09321.11
5.6.100.0070.05320.97
5.6.90.0100.08321.02
5.6.80.0070.03720.37
5.5.300.0030.07017.98
5.5.290.0070.08018.05
5.5.280.0130.07720.80
5.5.270.0100.06020.82
5.5.260.0030.04720.86
5.5.250.0030.08020.68
5.5.240.0300.06320.23

preferences:
142.74 ms | 1394 KiB | 7 Q