mirror of
https://github.com/php/php-src.git
synced 2024-09-29 13:56:09 +00:00
56c3d75780
This also affects bug #72119
20 lines
410 B
PHP
20 lines
410 B
PHP
--TEST--
|
|
Bug #72119 (Interface declaration compatibility regression with default values)
|
|
--FILE--
|
|
<?php
|
|
interface Foo {
|
|
public function bar(array $baz = null);
|
|
}
|
|
|
|
class Hello implements Foo {
|
|
public function bar(array $baz = [])
|
|
{
|
|
|
|
}
|
|
}
|
|
echo "OK\n";
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Declaration of Hello::bar(array $baz = Array) must be compatible with Foo::bar(?array $baz = NULL) in %s on line %d
|
|
|