3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Person { public string $firstName {get => $this->getFirstName();} public string $lastName {get => $this->getLastName();} public string $fullName { get => $this->firstName . ' ' . $this->lastName; } abstract protected function getFirstName(): string; abstract protected function getLastName(): string; } class Mark extends Person { protected function getFirstName(): string { return 'Mark'; } protected function getLastName(): string { return 'Zukarberger'; } } $mark = new Mark(); var_dump( $mark->firstName, $mark->lastName, $mark->fullName, );

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.4.70.0120.00919.49

preferences:
154.96 ms | 1005 KiB | 7 Q