}
?>
--EXPECTF--
-Fatal error: Declaration of B::foo($var) must be compatible with A::foo() in %sbug62358.php on line 17
+Fatal error: Declaration of B::foo($var) must be compatible with A::foo() in %sbug62358.php on line 18
echo "okey";
?>
--EXPECTF--
-Warning: Declaration of Smooth1::insert(array $data) should be compatible with Noisy1::insert(array $data, $option1 = NULL) in %sbug64988.php on line 20
+Warning: Declaration of Smooth1::insert(array $data) should be compatible with Noisy1::insert(array $data, $option1 = NULL) in %sbug64988.php on line 17
okey
public function m(array $a = []) {}
}
--EXPECTF--
-Warning: Declaration of B::m(array $a = Array) should be compatible with A::m(?array $a = NULL) in %sbug71428.1.php on line 7
+Warning: Declaration of B::m(array $a = Array) should be compatible with A::m(?array $a = NULL) in %sbug71428.1.php on line 6
public function a() {}
}
--EXPECTF--
-Fatal error: Declaration of Two::a() must be compatible with One::a(): object in %s on line 9
+Fatal error: Declaration of Two::a() must be compatible with One::a(): object in %s on line 8
$qux = new qux();
var_dump($qux->bar());
--EXPECTF--
-Fatal error: Declaration of qux::bar(): qux must be compatible with foo::bar(): foo in %s008.php on line 7
+Fatal error: Declaration of qux::bar(): qux must be compatible with foo::bar(): foo in %s008.php on line 8
?>
DONE
--EXPECTF--
-Fatal error: Declaration of B::foo(): ?int must be compatible with A::foo(): int in %s031.php on line 7
+Fatal error: Declaration of B::foo(): ?int must be compatible with A::foo(): int in %s031.php on line 6
$some = new SomeCollection();
var_dump($some->getIterator());
--EXPECTF--
-Fatal error: Declaration of SomeCollection::getIterator(): Generator must be compatible with Collection::getIterator(): Iterator in %sgenerators003.php on line 6
+Fatal error: Declaration of SomeCollection::getIterator(): Generator must be compatible with Collection::getIterator(): Iterator in %sgenerators003.php on line 7
}
}
--EXPECTF--
-Fatal error: Declaration of Bar::test(): Bar must be compatible with Foo::test(): Foo in %sinheritance005.php on line 12
+Fatal error: Declaration of Bar::test(): Bar must be compatible with Foo::test(): Foo in %sinheritance005.php on line 9
}
}
--EXPECTF--
-Fatal error: Declaration of Bar::test(): B must be compatible with Foo::test(): A in %sinheritance006.php on line 14
+Fatal error: Declaration of Bar::test(): B must be compatible with Foo::test(): A in %sinheritance006.php on line 11
}
}
--EXPECTF--
-Fatal error: Declaration of Bar::test(): ArrayObject must be compatible with Foo::test(): Traversable in %sinheritance007.php on line 12
+Fatal error: Declaration of Bar::test(): ArrayObject must be compatible with Foo::test(): Traversable in %sinheritance007.php on line 9
}
}
--EXPECTF--
-Fatal error: Declaration of UserGateway_MySql::find($id) must be compatible with UserGateway::find($id): User in %s on line 9
+Fatal error: Declaration of UserGateway_MySql::find($id) must be compatible with UserGateway::find($id): User in %s on line 11
error_level = E_WARNING;
error_verb = "should";
}
- zend_error(error_level, "Declaration of %s %s be compatible with %s", ZSTR_VAL(child_prototype), error_verb, ZSTR_VAL(method_prototype));
+ zend_error_at(error_level, NULL,
+ child->common.type == ZEND_USER_FUNCTION ? child->op_array.line_start : 0,
+ "Declaration of %s %s be compatible with %s",
+ ZSTR_VAL(child_prototype), error_verb, ZSTR_VAL(method_prototype));
zend_string_efree(child_prototype);
zend_string_efree(method_prototype);
}
echo "Foobar\n";
?>
--EXPECTF--
-Fatal error: Declaration of B::foo($bar) must be compatible with A::foo() in %spreload_inheritance_error.inc on line 7
+Fatal error: Declaration of B::foo($bar) must be compatible with A::foo() in %spreload_inheritance_error.inc on line 8