3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $bar = 'hello world'; } class FriendOfFoo { public function doSomething($foo) { return function() use ($foo) { echo $foo->bar; } } } $service = new FriendOfFoo(); $closure = $service->doSomething($foo)->bindTo($foo); $closure();

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.170.0080.04112.40
5.4.160.0120.03712.40
5.4.150.0120.03612.40
5.4.140.0100.04012.09
5.4.130.0070.04012.07
5.4.120.0090.03912.03
5.4.110.0090.04012.03
5.4.100.0130.03712.03
5.4.90.0110.03812.03
5.4.80.0090.04012.03
5.4.70.0080.03912.02
5.4.60.0090.03712.03
5.4.50.0080.03912.02
5.4.40.0090.03812.01
5.4.30.0120.04612.01
5.4.20.0090.03912.00
5.4.10.0110.03612.01
5.4.00.0100.03811.50
5.3.270.0090.04312.72
5.3.260.0110.04212.72
5.3.250.0090.04112.72
5.3.240.0120.03812.72
5.3.230.0100.04012.71
5.3.220.0100.04412.68
5.3.210.0080.04512.68
5.3.200.0110.04012.68
5.3.190.0110.04012.68
5.3.180.0090.03912.67
5.3.170.0080.04112.67
5.3.160.0100.04012.67
5.3.150.0100.04212.67
5.3.140.0090.04012.66
5.3.130.0100.04212.66
5.3.120.0110.04012.65
5.3.110.0090.04612.66
5.3.100.0100.04112.13
5.3.90.0130.04812.11
5.3.80.0110.04212.09
5.3.70.0100.04312.09
5.3.60.0110.04512.08
5.3.50.0100.04212.02
5.3.40.0080.04312.02
5.3.30.0090.04111.99
5.3.20.0100.04211.77
5.3.10.0110.04311.74
5.3.00.0100.04011.72

preferences:
142.07 ms | 1394 KiB | 7 Q