> I suggest either: > a) return true if you want the default handler to be called. I don't have a > problem with this but people here say it's opposite from other frameworks. > Are there really so many precedents? > b) return false (== IS_BOOL && value == 0). This gives a strict but > reasonable interface and is still BC. I don't see a reason why people > should be returning other false values besides "false". > If those are the choices, I say (B). The reason for the !NULL && !true was to maintain as much of PHP's boolean juggling as reasonable. NULL in this case being "unreasonable" because functions returning nothing are returning NULL and will get caught up in the defeault error handler if we leave everything else alone. As you said, it does bear an awful lot of "specialness" so perhaps the explicit (bool)flase is the better way to go. There is an option (C) of course: Add a function call from userspace to manually call the internal error handler: php_error_handler($errno, $errstr, $file, $line); From a code readability standpoint you don't spell it out any clearer than that.
At any rate, if this is going to sneak its way into 5.0.0 I'd like to see a nice big mention of it in RC3's announcement. Make sure those nice helpful early adopters are aware that it's comming. Needless to say we'll want to update set-error-handler.xml as well, but that's going to depend on whether behavior changes as a result of your concerns mentioned above. -Sara -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php