3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Dad { static function getStatic() { return new static; } static function getSelf() { return new self; } } trait Useless { static function getStatic() { return new static; } } final class A extends Dad { use Useless; static function getSelf() { return new self; } } var_dump(A::getStatic()::class); var_dump(A::getSelf()::class);

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.1.50.0140.00617.41
8.0.80.0000.00916.88
7.3.20.0120.00216.14
7.2.340.0060.00816.07

preferences:
85.77 ms | 402 KiB | 5 Q