3v4l.org

run code in 500+ PHP versions simultaneously
<?php class SkipProtectedPropertyOnNonFinalClass { protected int $value = 5; public function __construct(int $value) { $this->value = $value; } public function getValue() { return $this->value; } } class SomeChild extends SkipProtectedPropertyOnNonFinalClass { public function __construct() { } } $obj = new SomeChild(); echo $obj->getValue();

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.0310.00716.85
7.2.170.0240.00816.46

preferences:
50.27 ms | 484 KiB | 5 Q