mirror of
https://github.com/php/php-src.git
synced 2026-03-30 12:13:02 +02:00
RFC: https://wiki.php.net/rfc/deprecate-implicitly-nullable-types Co-authored-by: Gina Peter Banyard <girgias@php.net>
14 lines
319 B
PHP
14 lines
319 B
PHP
--TEST--
|
|
bug #71428.1: inheritance with null default values
|
|
--FILE--
|
|
<?php
|
|
class A {
|
|
public function m(?array $a = null) {}
|
|
}
|
|
class B extends A {
|
|
public function m(array $a = []) {}
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Declaration of B::m(array $a = []) must be compatible with A::m(?array $a = null) in %s on line %d
|