Re: Re: PHP5->PHP4 converter (was Re: [PEAR-DEV] Re: [PEPr] Comment on Networking::GeoIP)
| From: | Alan Knowles | Date: | Wed, 16 Jun 2004 14:57:30 +0000 |
| Subject: | Re: Re: PHP5->PHP4 converter (was Re: [PEAR-DEV] Re: [PEPr] Comment on Networking::GeoIP) | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-30778@lists.php.net to get a copy of this message | ||
Hans Lellelid wrote:
... But it won't really work with the error handling because you can't convert Exceptions (w/o lots of work!). Every call to a method that throws an Exception would need to check return value & re-return if PEAR::isError($return).Exceptions are one of the more nasty convertable elements: - however using return $this->raiseError($msg) ( which throws an error or lazy loads PEAR & returns pear error.) and generally using boolean returns should make reasonably small packages possible to be written in PHP5, and convertable to PHP4, with minimal inconvenience. I suspect packages like calendar, if ever PHP5'ized may be too big to use this.. - but it provides a good bridge (considering 80% of the packages are < 5 classes at present.) Regards alan
Hans-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com