3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * call a closure inside an array returned by another closure * */ $arr["bleh"] = 0; $c = function(){ echo "a simple closure"; }; $foo = function() use ($arr,$c){ $arr["bar"] = $c; return $arr; } $foo()["bar"]();

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.0200.04320.13
7.0.10.0070.07020.19
7.0.00.0100.05320.15
5.6.160.0130.05720.54
5.6.150.0070.08318.17
5.6.140.0130.07718.28
5.6.130.0100.04318.15
5.6.120.0100.07021.00
5.6.110.0070.09020.96
5.6.100.0030.08321.00
5.6.90.0070.07721.08
5.6.80.0070.06020.34
5.5.300.0100.07317.95
5.5.290.0070.07717.99
5.5.280.0000.04720.88
5.5.270.0100.03720.95
5.5.260.0030.04020.78
5.5.250.0070.06020.55
5.5.240.0130.08320.34

preferences:
163.14 ms | 1394 KiB | 7 Q