Open
Description
Description
The following code:
<?php
class C extends P {
public const int X = 42;
}
class P {
public const string X = 'X';
}
Resulted in this output:
Fatal error: Type of C::X must be compatible with P::X of type string in /in/ZAZYv on line 3
But I expected this output instead:
Fatal error: Type of C::X must be compatible with P::X of type string in /in/ZAZYv on line 4
Same goes for properties. From property hooks feedback:
PHP Version
*
Operating System
No response