- Output for 7.1.25, 7.2.0 - 7.2.15, 7.3.0 - 7.3.2
- Fatal error: Declaration of ChildClass::foo($arg) must be compatible with ParentClass::foo(string $arg): string in /in/Tg6Rr on line 15
Process exited with code 255.
<?php
class ParentClass
{
function foo(string $arg): string
{}
}
class ChildClass extends ParentClass
{
// typehints are missing
function foo($arg)
{}
}