3v4l.org

run code in 500+ PHP versions simultaneously
<?php class x { public string $p = 'abc'; } const A = new x; A->p = 'def'; echo A->p; // def ?>
Output for 8.2.0 - 8.2.27, 8.3.0 - 8.3.17, 8.4.1 - 8.4.4
Fatal error: Cannot use temporary expression in write context in /in/Ej6t6 on line 9
Process exited with code 255.

preferences:
39.24 ms | 692 KiB | 3 Q