|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-09-14 22:13 UTC] ceo at l-i-e dot com
It would be Really Nifty (tm) if the class system would tell me *WHERE* somebody has already defined "class foo" when it won't let me create class foo because it already exists. Some bozo is making me use "class User" (how original) but I've got no idea where the *other* class User is and which one will be less hassle to change, and PHP ain't telling :-( I hate inexperienced OO programmers. They cause more problems than if we just made them not use OO in the first p PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 13:00:01 2025 UTC |
It's a FEATURE REQUEST, not a support question. Currently, PHP's error message when encountering: class foo { the SECOND time simply tells me it's "already defined". While that would be useful if I was, say, including the same file twice, it's not particularly useful when trying to integrate two (or more) object-oriented 3rd-party libraries. The error message would be infinitely more useful if it included the __FILE__ and __LINE__ of the first: class foo { This is essentially the same problem/solution as the old "headers already sent" problem, which now explicitly states which line/file caused the original out