Re: [PEPr] Comment on PHP::PHP_Compatibility
| From: | Davey | Date: | Fri, 20 Feb 2004 09:24:54 +0000 |
| Subject: | Re: [PEPr] Comment on PHP::PHP_Compatibility | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-25738@lists.php.net to get a copy of this message | ||
Pepr wrote:
Stefan Neufeind (http://pear.php.net/user/neufeind) has commented on the proposal for PHP::PHP_Compatibility. Comment: Though I haven't yet had time for a test, as we've already discussed I'm much in favor of such a package. It would be a nice option to be able to check which lines of code make it dependent on certain versions, so that it's just one call that demands latest php-release and everything else will run fine under 4.2.0 you have a chance to maybe workaround that one line to be far more compatible with not too much work (where possible). Proposal information: http://pear.php.net/pepr/pepr-proposal-show.php?id=27Stefan, Narrowing it down to the line is impossible from tokens, AFAIK, HOWEVER I could make it keep an array like: functions => array('4.1.0' => array('some_func_added_in_4.1.0','foo'), '4.3.0' => array('some_func_added_in_4.3.0','bar')); It could *even* create an array of things that won't run on the current install... either because the extension isn't loaded or because the version doesn't have X functions. I also want to make it check for constants like __FILE__ and __LINE__ - and what about superglobals? I think that may be too costly. - Davey