<?php
error_reporting(-1);
class B
{
function myfunction($var = "default")
{
echo $var;
}
}
class C extends B
{
function myfunction()
{
echo "myfunction";
}
}
$c = new C();
$c->myfunction();
$b = new B();
$b->myfunction();
Fatal error: Declaration of C::myfunction() must be compatible with B::myfunction($var = 'default') in /in/nZZHv on line 14
Process exited with code 255.
Output for 7.4.0 - 7.4.33
Warning: Declaration of C::myfunction() should be compatible with B::myfunction($var = 'default') in /in/nZZHv on line 14
myfunctiondefault