3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public int $bar { get => $this->bar; set => empty($this->bar) ? $this->bar = $value : throw new LogicException("nope"); } } $foo = new Foo; $foo->bar = 0; var_dump($foo->bar); $foo->bar = 1; // no error ! var_dump($foo->bar);

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

preferences:
137.43 ms | 993 KiB | 7 Q