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->second()->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.0100.07720.12
5.6.160.0100.04020.48
5.6.150.0170.06018.25
5.6.140.0030.05018.14
5.6.130.0070.07018.18
5.6.120.0100.04320.99
5.6.110.0000.04321.00
5.6.100.0070.08721.02
5.6.90.0070.07720.93
5.6.80.0230.06320.44
5.5.300.0030.03718.08
5.5.290.0070.07017.92
5.5.280.0030.08720.77
5.5.270.0070.04720.76
5.5.260.0030.04020.84
5.5.250.0070.08320.69
5.5.240.0200.05720.26

preferences:
142.55 ms | 1394 KiB | 7 Q