3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace A { class T {} } namespace { class Test { public function first(string $str) : Closure { return function() use (string $str) : int { return strlen($str); }; } public function second(): self { return $self; } } $t = new Test; echo ($t->seconf()->first("hello"))(); }

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.00.0070.06320.11
5.6.160.0100.04320.71
5.6.150.0030.04318.16
5.6.140.0070.06718.20
5.6.130.0100.08718.27
5.6.120.0030.05320.99
5.6.110.0030.04320.97
5.6.100.0100.06721.14
5.6.90.0130.07721.00
5.6.80.0130.07720.53
5.5.300.0070.03318.00
5.5.290.0070.08018.10
5.5.280.0170.07320.88
5.5.270.0000.04320.75
5.5.260.0000.04720.64
5.5.250.0270.06020.71
5.5.240.0230.07020.27

preferences:
150.78 ms | 1394 KiB | 7 Q