3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface ValidationInterface {} class BaseModel { protected ValidationInterface $validation; } class MyModel extends BaseModel { protected $validation; }
Output for 8.1.0 - 8.1.10
Fatal error: Type of MyModel::$validation must be ValidationInterface (as in class BaseModel) in /in/NkQVr on line 9
Process exited with code 255.
Output for 7.4.1 - 7.4.30, 8.0.1 - 8.0.23
Fatal error: Type of MyModel::$validation must be ValidationInterface (as in class BaseModel) in /in/NkQVr on line 11
Process exited with code 255.
Output for 7.4.0
Fatal error: Type of MyModel::$ must be ValidationInterface (as in class BaseModel) in /in/NkQVr on line 11
Process exited with code 255.

preferences:
160.75 ms | 1073 KiB | 8 Q