mirror of
https://github.com/php/php-src.git
synced 2025-01-19 02:03:47 +08:00
8d00385871
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.
23 lines
335 B
PHP
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
|