Re: Re: [ANNOUNCEMENT] Contact_Vcard_Parse-1.30 (stable) Released.

From: Date: Thu, 19 Feb 2004 01:06:28 +0000
Subject: Re: Re: [ANNOUNCEMENT] Contact_Vcard_Parse-1.30 (stable) Released.
References: 1 2 3 4 5 6  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-25712@lists.php.net to get a copy of this message
I agree with lukas here - the trade off of creating this function for 'OLD' installations is worth the risk/kludge.. - Having to maintain extra code just to deal with Older versions of PHP is a real nightmare... Here's another example of a klude for FC if (substr(php_version(),0,1) != 5) { eval("function clone($obj) { return $obj; }"); } 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.... Regards Alan
Hi,
the better approach would have been to do something like this: if(!function_exists("file_get_contents")) {
    function file_get_contents($filename, $use_include_path = 0)


« previous php.pear.dev (#25712) next »