xref: /PHP-7.2/Zend/tests/bug72119.phpt (revision f1d7e3ca)
1--TEST--
2Bug #72119 (Interface declaration compatibility regression with default values)
3--FILE--
4<?php
5interface Foo {
6    public function bar(array $baz = null);
7}
8
9class Hello implements Foo {
10    public function bar(array $baz = [])
11    {
12
13    }
14}
15echo "OK\n";
16?>
17--EXPECTF--
18Fatal error: Declaration of Hello::bar(array $baz = Array) must be compatible with Foo::bar(?array $baz = NULL) in %s on line %d
19