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="Bu"){return "Hello lo $arg"; }; } $bla = new Bla; echo ($bla->fn)('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.0300.04020.30
7.0.10.0100.06720.09
7.0.00.0130.05320.09
5.6.170.0330.06720.46
5.6.160.0130.07320.56
5.6.150.0070.03718.14
5.6.140.0030.05318.18
5.6.130.0070.05018.12
5.6.120.0030.04321.05
5.6.110.0130.08021.11
5.6.100.0030.06721.10
5.6.90.0070.04020.95
5.6.80.0000.04320.38
5.5.310.0170.04720.31
5.5.300.0070.08317.92
5.5.290.0030.08318.04
5.5.280.0070.09020.88
5.5.270.0130.08720.93
5.5.260.0030.09020.98
5.5.250.0130.07720.59
5.5.240.4230.04020.26

preferences:
137.47 ms | 1394 KiB | 7 Q