3v4l.org

run code in 500+ PHP versions simultaneously
<?php interface i { public $p { get;} } class x implements i { public $p = 1 { get => $this->p;} } echo (new x)->p;
Output for 8.3.5
Parse error: syntax error, unexpected token "{", expecting "," or ";" in /in/U4AZH on line 4
Process exited with code 255.
Output for 8.4.8 - 8.4.26, 8.5.0 - 8.5.2
1

preferences:
26.3 ms | 1154 KiB | 7 Q