3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static function bar() { return array(1,2,3,4); } } $tmp = Foo::bar(); var_dump(array_pop($tmp)); var_dump(array_pop(Foo::bar())); // Works with HHVM, PHP: Strict Standards: Only variables should be passed by reference in /in/7aWJe on line 10 var_dump(array_splice(Foo::bar(),2)); // Works with HHVM, PHP: Strict Standards: Only variables should be passed by reference in /in/7aWJe on line 11 //var_dump(array_splice(array(1,2,3,4),2)); // Works with HHVM, PHP: Fatal error: Only variables can be passed by reference in /in/Z57M3 on line 12

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)
vld0.0080.02316.45
4.3.00.0030.03712.59
git.master0.0110.00315.03
rfc.partials0.0060.01016.72

preferences:
65.59 ms | 454 KiB | 5 Q