3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ protected $stuff; function setStuff(int $foo){ $this->stuff = $foo; } function getStuff(): int{ return $this->stuff; } } $x = new A; var_export($x);

preferences:
31.67 ms | 402 KiB | 5 Q