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

19 lines
406 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 = []) must be compatible with Foo::bar(?array $baz = null) in %s on line %d