3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); // lint >= 8.0 namespace Bug7109; class HelloWorld { public int $aaa = 5; /** * @return HelloWorld|null */ public function get(): ?HelloWorld { return rand() ? $this : null; } } $a = new HelloWorld(); $b = null; var_dump($a->get()->aaa ?? 6); var_dump($b->aaa ?? 7);

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

preferences:
52.22 ms | 488 KiB | 5 Q