php-src/tests/classes/method_override_optional_arg_002.phpt
Nikita Popov 8d00385871 Reclassify E_STRICT notices
Per RFC https://wiki.php.net/rfc/reclassify_e_strict

While reviewing this, found that there are still three E_STRICTs
left in libraries - need to discuss those.
2015-04-01 11:17:55 +02:00

23 lines
335 B
PHP

--TEST--
Omitting optional arg in method inherited from abstract class
--FILE--
<?php
abstract class A {
function foo($arg = 1) {}
}
class B extends A {
function foo() {
echo "foo\n";
}
}
$b = new B();
$b->foo();
?>
--EXPECTF--
Warning: Declaration of B::foo() should be compatible with A::foo($arg = 1) in %s on line %d
foo