xref: /PHP-8.0/Zend/tests/bug72119.phpt (revision fe9860c2)
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 = []) must be compatible with Foo::bar(?array $baz = null) in %s on line %d
19