3v4l.org

run code in 300+ PHP versions simultaneously
<?php class P { protected static $v = 1; public function output() { echo new ReflectionProperty($this, 'v')->getValue($this); } } class C extends P { public function test(P $i) { return $i->v; } } class C2 extends P { protected static $v = 2; } $c = new C; $c2 = new C2; $reflection = new ReflectionClass(P::class); $property = $reflection->getProperty('v'); echo $property->getValue($c2); echo new ReflectionProperty(P::class, 'v')->getValue($c2); $c2->output();

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

preferences:
135.38 ms | 993 KiB | 7 Q