3v4l.org

run code in 500+ PHP versions simultaneously
<?php final class Thing { private string $state; public function __construct() { $this->state = 'foo'; } public function __set(string $property, $value) : void { $this->$property = $value; } } var_dump(new Thing());

preferences:
105.73 ms | 1476 KiB | 5 Q