|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-04-15 03:28 UTC] derick@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 16 19:00:01 2025 UTC |
Description: ------------ It would be nice for the object type hinting mechanism in PHP5 to, instead of failing with the expected class and line number of the definition, but failing with the expected and actual classes, and the line numbers of the definition AND the call. Reproduce code: --------------- <?php class Foo { function zod(Bar $f) { ... } } class Bar { } class Baz { } $f = new Foo(); $f->zod(new Baz()); ?> Expected result: ---------------- Fatal error: Argument 1 must be an object of class Bar (not Baz) in file.php on line 4, called in Foo::zod() by file.php on line 11 Actual result: -------------- Fatal error: Argument 1 must be an object of class Bar in file.php on line 4