3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { public function __construct(private Bar $bar, private string $_value = 'foo') {} public string $value { get => $this->_value; set { $this->bar->doSomething($this); $this->_value = $value; } } } class Bar { public function doSomething(Foo $foo): void { $oldValue = $foo->value; } } $foo = new Foo(new Bar()); $foo->value = '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.3.50.0050.00416.73

preferences:
43.15 ms | 493 KiB | 4 Q