3v4l.org

run code in 500+ PHP versions simultaneously
<?php interface ValidationInterface {} class BaseModel { protected ValidationInterface $validation; } class MyModel extends BaseModel { protected $validation; }
Output for 8.1.0 - 8.1.34, 8.2.0 - 8.2.36, 8.3.0 - 8.3.5
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.33, 8.0.0 - 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:
16.91 ms | 1169 KiB | 5 Q