3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = new StdClass; $obj->fn = function($arg) { return "Hello $arg"; }; echo ($obj->fn)('World'); class Bla { public $fn = function($arg){return "Hello lo"; }; } $bla = new Bla; echo ($bla->fun)('Wa');

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.20.0430.06720.24
7.0.10.0100.08720.25
7.0.00.0070.07720.23
5.6.170.0270.05320.62
5.6.160.0070.07320.50
5.6.150.0030.04018.30
5.6.140.0030.08318.15
5.6.130.0030.04318.14
5.6.120.0100.08321.10
5.6.110.0100.08721.03
5.6.100.0070.05320.98
5.6.90.0070.05720.99
5.6.80.0100.05320.42
5.5.310.0330.04720.39
5.5.300.0070.08317.92
5.5.290.0070.08718.05
5.5.280.0130.08020.98
5.5.270.0170.04720.88
5.5.260.0100.08020.87
5.5.250.0170.07020.59
5.5.240.3570.03720.02

preferences:
140.34 ms | 1394 KiB | 7 Q