> -----Original Message----- > From: Marcus Börger [mailto:[EMAIL PROTECTED] > Sent: Friday, June 20, 2003 9:47 AM > To: Zeev Suraski > Cc: Marcus Börger; [EMAIL PROTECTED] > Subject: Re[2]: [PHP-DEV] php5 beta
> And once again there is only a problem when mixing old and new > code. And the > idea of a) an ini setting and b) activating auto-exceptions only inside > try-catch blocks would be very easy to understand and handle. And > allows the > user to decide whether he thinks he understands exceptions and > want to deal > with them where no BC complaints prevent that. An ini setting for throwing exceptions from previously non-fatal errors would be a bad idea; it'd be the magic quotes nightmare all over again. You'd have to be continuously flipping the setting on and off in mixed code to make it work right, and I've yet to see anyone attempt to do that for magic quotes. Auto-exceptions for previously non-fatal errors inside try-catch blocks would be a bad idea as well, as the first thing I and others will do is wrap our page base with try/catch, and then using any pre-php5 code will skip all the error handling in that code which will break things. Even if you use try-catch in small areas, you'll surely wind up with cases where old code exists under that, like a new object using an old library at some level, and you'll have the same problem. It really sounds like the best way to proceed with legacy PHP functions is to add wrappers (PEAR?) that throw the non-fatal errors from the legacy function, or not modify them at all (I'd much prefer included wrappers, as otherwise everyone winds up duplicating the effort of wrapping legacy functions). New functions (php5) can throw non-fatal errors as there's no legacy issue. Previously fatal errors can be thrown as well as they used to just halt. That's very straight-forward and doesn't cause any problems for mixed php4/php5 code. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php