mirror of
https://github.com/php/php-src.git
synced 2024-11-25 10:54:15 +08:00
23 lines
344 B
PHP
23 lines
344 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--
|
|
Strict Standards: Declaration of B::foo() should be compatible with that of A::foo() in %s on line %d
|
|
foo
|