xref: /PHP-8.1/Zend/tests/bug71428.3.phpt (revision fd2db119)
1--TEST--
2bug #71428: Validation type inheritance with = NULL
3--FILE--
4<?php
5class A { }
6class B           {  public function m(A $a = NULL, $n) { echo "B.m";} };
7class C extends B {  public function m(A $a       , $n) { echo "C.m";} };
8?>
9--EXPECTF--
10Fatal error: Declaration of C::m(A $a, $n) must be compatible with B::m(?A $a, $n) in %sbug71428.3.php on line 4
11