3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * * Calling static method on a string class or object returned by */ invoking instance method class foo { 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 foo; echo $foo::bar()::baz(); 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.04320.08
7.0.00.0100.03320.07
5.6.160.0000.05720.39
5.6.150.0100.06718.19
5.6.140.0000.04718.15
5.6.130.0070.07718.14
5.6.120.0100.05321.00
5.6.110.0100.04021.01
5.6.100.0000.05021.13
5.6.90.0030.09321.09
5.6.80.0130.08020.38
5.5.300.0000.07018.02
5.5.290.0100.08017.96
5.5.280.0070.07320.88
5.5.270.0070.05320.88
5.5.260.0070.07720.87
5.5.250.0070.03720.61
5.5.240.0270.07020.23

preferences:
139.2 ms | 1394 KiB | 7 Q