3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public mixed $data { get => $this->data ?? null; //throw new Exception("this property is not set."); set => $this->data = $value; isset => isset($this->data); } } $foo = new Foo(); //option 1 var_dump(?$foo->data); // This should produce the same output as an "isset" //option 2 var_dump($foo->data?isset); // This should join on "isset" hook
Output for 8.4.2
Parse error: syntax error, unexpected token "isset", expecting identifier in /in/Q6Ep9 on line 10
Process exited with code 255.

preferences:
156.61 ms | 995 KiB | 7 Q