3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace A { class T {} } namespace { $hello = 42; class Test { public function first(string $str): Closure { return function(): int use ($str) { return strlen($str); }; } public function second(int $i): self { } } $t = new Test; echo ($t->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.06020.10
5.6.160.0000.05020.51
5.6.150.0070.07018.23
5.6.140.0100.04718.14
5.6.130.0030.04018.28
5.6.120.0070.06021.14
5.6.110.0170.07321.00
5.6.100.0030.07321.03
5.6.90.0070.08321.11
5.6.80.0030.04720.53
5.5.300.0100.03717.98
5.5.290.0070.08018.05
5.5.280.0100.08720.83
5.5.270.0030.05320.84
5.5.260.0000.09020.97
5.5.250.0000.04320.58
5.5.240.0130.07020.19

preferences:
134.81 ms | 1394 KiB | 7 Q