This also affects bug #72119
--TEST--
bug #71428.1: inheritance with null default values
---XFAIL--
-This is a BC break
--FILE--
<?php
class A {
--TEST--
bug #71428: Validation type inheritance with = NULL
---XFAIL--
-This is a BC break
--FILE--
<?php
class A { }
}
echo "OK\n";
?>
---EXPECT--
-OK
+--EXPECTF--
+Fatal error: Declaration of Hello::bar(array $baz = Array) must be compatible with Foo::bar(?array $baz = NULL) in %s on line %d
return 0;
}
-#if 0
// This introduces BC break described at https://bugs.php.net/bug.php?id=72119
if (proto_arg_info->type_hint && proto_arg_info->allow_null && !fe_arg_info->allow_null) {
/* incompatible nullability */
return 0;
}
-#endif
/* by-ref constraints on arguments are invariant */
if (fe_arg_info->pass_by_reference != proto_arg_info->pass_by_reference) {