php-src/Zend/tests/bug71428.1.phpt
2020-04-10 22:50:33 +02:00

13 lines
315 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