3v4l.org

run code in 500+ PHP versions simultaneously
<?php final class SkipUsedByReflectionAsArrayCallable { public function run(): int { $reflectionMethod = new \ReflectionMethod(...[$this, 'methodInjection']); return $reflectionMethod->getNumberOfParameters(); } private function methodInjection(\stdClass $contextArgument): void { } } $obj = new SkipUsedByReflectionAsArrayCallable(); echo $obj->run();

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)
8.5.80.0040.00516.84
8.5.70.0080.00116.70
8.4.230.0050.00519.52
8.4.220.0090.00419.40
8.4.90.0060.00717.71
8.3.320.0030.00518.29
8.3.180.0060.00216.65
8.3.50.0050.00316.73
8.2.320.0050.00417.96
8.1.340.0290.00917.77

preferences:
57.34 ms | 524 KiB | 5 Q