--- /dev/null
+--TEST--
+Bug #47981 (error handler not called regardless)
+--INI--
+error_reporting=0
+--FILE--
+<?php
+function errh($errno, $errstr) {
+ var_dump($errstr);
+}
+set_error_handler("errh");
+
+interface a{}
+class b implements a { function f($a=1) {}}
+class c extends b {function f() {}}
+?>
+--EXPECTF--
+string(62) "Declaration of c::f() should be compatible with that of b::f()"
+
+
if (!zend_do_perform_implementation_check(child, child->common.prototype)) {
zend_error(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with that of %s::%s()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(child->common.prototype), child->common.prototype->common.function_name);
}
- } else if (EG(error_reporting) & E_STRICT) { /* Check E_STRICT before the check so that we save some time */
+ } else if (EG(error_reporting) & E_STRICT || EG(user_error_handler)) { /* Check E_STRICT (or custom error handler) before the check so that we save some time */
if (!zend_do_perform_implementation_check(child, parent)) {
zend_error(E_STRICT, "Declaration of %s::%s() should be compatible with that of %s::%s()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(parent), parent->common.function_name);
}