mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
fe9860c2b0
Closes GH-5361
19 lines
552 B
PHP
19 lines
552 B
PHP
--TEST--
|
|
Bug #73987 (Method compatibility check looks to original definition and not parent - nullability interface)
|
|
--FILE--
|
|
<?php
|
|
|
|
interface I {
|
|
public function example($a, $b, $c);
|
|
}
|
|
class A implements I {
|
|
public function example($a, $b = null, $c = null) { } // compatible with I::example
|
|
}
|
|
class B extends A {
|
|
public function example($a, $b, $c = null) { } // compatible with I::example
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Declaration of B::example($a, $b, $c = null) must be compatible with A::example($a, $b = null, $c = null) in %s on line %d
|