3v4l.org

run code in 300+ PHP versions simultaneously
<?php class bla { public $foo = function ($var){ echo "closure test $var\n"; }; } $objBla = new bla(); ($objBla->foo)("someval");

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.07320.12
7.0.10.0170.07720.22
7.0.00.0130.08320.12
5.6.170.0230.06020.55
5.6.160.0100.08020.76
5.6.150.0030.04018.16
5.6.140.0070.03718.11
5.6.130.0030.04318.14
5.6.120.0030.04020.86
5.6.110.0030.09020.97
5.6.100.0070.06321.00
5.6.90.0070.06020.98
5.6.80.0000.09020.50
5.5.310.0430.07720.32
5.5.300.0070.04017.96
5.5.290.0070.04718.02
5.5.280.0070.07020.77
5.5.270.0200.06020.72
5.5.260.0030.08020.76
5.5.250.0030.08720.57
5.5.240.4230.03720.24

preferences:
139.94 ms | 1394 KiB | 7 Q