Re: Re: [ANNOUNCEMENT] Contact_Vcard_Parse-1.30 (stable) Released.
| From: | Paul M Jones | Date: | Thu, 19 Feb 2004 01:27:16 +0000 |
| Subject: | Re: Re: [ANNOUNCEMENT] Contact_Vcard_Parse-1.30 (stable) Released. | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-25713@lists.php.net to get a copy of this message | ||
On Feb 18, 2004, at 7:06 PM, Alan Knowles wrote:
It would be nice to have a library that attempted to implement these....
eg. at the end of PEAR.php
if (php version < 4.3) { // if php is less than the current version
$version = substr(php_version(),0,3);
// include emulators and warning messages...
include 'PEAR/Compact/$version.php';
}
even if some of those features where implemented as
function file_get_contents() {
trigger_error('file_get_contents is not available in version '.php_version().' please upgrade to version 4.3 or greater',E_FATAL);
}
It would make a world of difference....
Yes, I can see how that is a valid concern. However, upgrading is not an option for some end-users, who must labor under tyrant sysadmins who cannot or will not upgrade PHP installations. This is also an issue for those of us who write code specifically for distribution must keep in mind, and where the PHP version (within two minor revisions) is not guaranteed.
If it is to be done, then, would it not be best as part of PEAR.php or some other package dedicated to forwards/backwards compatibility (when it comes to native PHP functions)? That way you avoid multiple different packages stepping on each others' feet when it comes to defining global functions.
In a way, this coincides nicely with Davey Shafik's "PHP compatibility" RFC [1]. Perhaps a combination of the two ... ?
[1] http://marc.theaimsgroup.com/?t=107707266900001&r=1&w=2
--
Paul M. Jones
pmjones@ciaweb.net
Savant: the simple alternative to Smarty.
http://phpsavant.com/