Re: Re: [ANNOUNCEMENT] Contact_Vcard_Parse-1.30 (stable) Released.
| From: | Lukas Smith | Date: | Wed, 18 Feb 2004 23:47:26 +0000 |
| Subject: | Re: Re: [ANNOUNCEMENT] Contact_Vcard_Parse-1.30 (stable) Released. | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-25709@lists.php.net to get a copy of this message | ||
Paul M Jones wrote:
On Feb 18, 2004, at 4:36 PM, Lukas Smith wrote:Then you are still penalizing the php 4.3 users .. not as badly though. However what are the chance of someone having implemented a method with the same name but with different incompatible functionality? I'd say more unlikely than me winning the lottery .. lets hope someone has :-) regards, Lukas Smith smith@backendmedia.com _______________________________ BackendMedia www.backendmedia.com berlin@backendmedia.com Linn Zwoch Smith GbR Pariser Str. 44 D-10707 Berlin Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07Paul M Jones wrote:...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)...I thought of that, but I am paranoid about polluting the global function space.Quite right; it is certain to be rare. Perhaps my sensibilities are too finely tuned. I think given the nature of the class, the penalty for most 4.3 users is negligible to nonexistent. There is a middle way that I just thought of: the fromFile() method itself can check to see if function_exists('file_get_contents'): if so, then use it; if not, use the internal method. Both spheres are then at peace. :-) I can implement easily that if anyone really cares.Thus, I think the method used in Contact_Vcard_Parse is safer when combined with an unknown code base (which the end-user code base certainly is) ... but that's just me.Yeah I guess you could argue that way. I still dont quite agree, since the chance for a collision is very rare and you penalize all the 4.3 users for those rare cases.