3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Named { // Objects implementing this interface must have a readable // $fullName property. That could be satisfied with a traditional // property or a property with a "get" hook. public string $fullName { get; } } interface Named1 { // Objects implementing this interface must have a readable // $fullName property. That could be satisfied with a traditional // property or a property with a "get" hook. protected string $fullName { get; } } interface Named2 { // Objects implementing this interface must have a readable // $fullName property. That could be satisfied with a traditional // property or a property with a "get" hook. private string $fullName { get; } }
Output for 8.4.1
Fatal error: Property in interface cannot be protected or private in /in/TBaXF on line 16
Process exited with code 255.
Output for 8.1.0 - 8.1.31, 8.2.0 - 8.2.26, 8.3.0 - 8.3.14
Parse error: syntax error, unexpected token "{", expecting "," or ";" in /in/TBaXF on line 8
Process exited with code 255.

preferences:
164.21 ms | 999 KiB | 7 Q