3v4l.org

run code in 500+ PHP versions simultaneously
<?php class test { protected $container; public function __construct() { } public function __get($name) { if ($name === 'container') { $a = new stdClass(); $a->test = random_bytes(7); return $a; } } public function __set($name, $value) { if ($name === 'container') { } } function blah() { $this->container = 'test'; } public function dump() { var_dump($this->container); } } $a =new test(); $a->dump(); $a->blah(); $a->dump(); var_dump($a->container);

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

preferences:
29.85 ms | 481 KiB | 5 Q