<?php
error_reporting(E_ALL | E_STRICT);
assert(error_reporting() & E_STRICT); // Make sure E_STRICT reporting is really turned on
class Foo
{
public function test($a, $b)
{
return $a + $b;
}
}
class Bar extends Foo
{
public function test()
{
return parent::test(1, 3);
}
}
$bar = new Bar();
assert($bar->test() === 4);
Strict Standards: Declaration of Bar::test() should be compatible with that of Foo::test() in /in/R1Uc7 on line 20
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/R1Uc7 on line 8
Process exited with code 255.
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/R1Uc7 on line 8
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/R1Uc7 on line 8
Process exited with code 255.