mirror of
https://github.com/php/php-src.git
synced 2024-12-17 22:09:12 +08:00
11 lines
364 B
PHP
11 lines
364 B
PHP
--TEST--
|
|
bug #71428: Validation type inheritance with = NULL
|
|
--FILE--
|
|
<?php
|
|
class A { }
|
|
class B { public function m(A $a = NULL, $n) { echo "B.m";} };
|
|
class C extends B { public function m(A $a , $n) { echo "C.m";} };
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Declaration of C::m(A $a, $n) must be compatible with B::m(?A $a, $n) in %sbug71428.3.php on line 4
|