On Fri, Dec 19, 2003 at 04:00:34PM +0100, Derick Rethans wrote: > > Don't worry about this, as PHP wasnever really forwards compatible > anyway.
I, and lots of people, need to worry about it. I write code that uses PHP. Much of it is for general public consumption. Some is for sale at significant cost. I have to write stuff once and have it work anywhere.
The proposed behavior of having error handlers called only when the reporting bitmask is met is great. Makes things better in PHP 5 and doesn't have real negative impacts for code written expecting PHP 4's behavior.
That simply isn't true. You may very well shut all errors off in production code, and rely on everything going through your error handler. It's not that rare at all.
Adding an optional argument has the worst of both worlds. In order to take advantage of it, one must lock your code into PHP 5.
As Derick said, PHP was never forward compatible (can't think of any language/platform that is). I, for one, think that the optional argument makes a great deal of sense. As a matter of fact, in practice - you can easily get forward-compatibility. Just supply it in both PHP 4 and 5 - extra arguments are ignored anyway (just provide @ to make sure of that).
Zeev
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php