3v4l.org

run code in 300+ PHP versions simultaneously
<?php $closures = array(); $simple_closure = function() { return 'hello world';}; for ($x=0; $x < 2; $x++) { $closures[$x] = $simple_closure; } $obj1 = new stdClass; $obj1->color = "red"; $obj2 = new stdClass; $obj2->color = "blue" $c1 = Closure::bind($closures[0], $obj1); $c2 = Closure::bind($closures[1], $obj2); var_dump($c1,$c2); print "<span style='$obj1.color'>",$c1(),'</span>'; print "<span style='$obj2.color'>",$c2(),'</span>';

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)
5.4.220.0200.06812.39
5.4.210.0160.03912.39
5.4.200.0120.04312.39
5.4.190.0160.03712.39
5.4.180.0130.04112.39
5.4.170.0250.05712.39
5.4.160.0120.04512.39
5.4.150.0150.04412.39
5.4.140.0210.06412.08
5.4.130.0120.04512.06
5.4.120.0140.05312.03
5.4.110.0190.05212.03
5.4.100.0210.06712.03
5.4.90.0180.05012.02
5.4.80.0110.04112.03
5.4.70.0150.04212.02
5.4.60.0230.06012.02
5.4.50.0120.03812.02
5.4.40.0230.06112.01
5.4.30.0120.04212.00
5.4.20.0120.04112.00
5.4.10.0080.04712.01
5.4.00.0110.03811.50
5.3.270.0120.04212.72
5.3.260.0110.04312.72
5.3.250.0100.04212.72
5.3.240.0150.06712.72
5.3.230.0150.03912.71
5.3.220.0100.04312.68
5.3.210.0120.04312.68
5.3.200.0100.04312.68
5.3.190.0120.04312.68
5.3.180.0110.04112.67
5.3.170.0120.03912.67
5.3.160.0120.04112.67
5.3.150.0200.05112.67
5.3.140.0140.03912.66
5.3.130.0130.04012.66
5.3.120.0260.05812.66
5.3.110.0100.04412.66
5.3.100.0130.03912.12
5.3.90.0130.03712.09
5.3.80.0110.04312.08
5.3.70.0150.05412.08
5.3.60.0120.04012.07
5.3.50.0120.04112.02
5.3.40.0130.03812.02
5.3.30.0130.05211.98
5.3.20.0110.03911.76
5.3.10.0100.03911.72
5.3.00.0100.04011.71

preferences:
136.91 ms | 1394 KiB | 7 Q