Re: is_a, instanceof, conclusion

From: Date: Thu, 11 Aug 2005 15:44:23 +0000
Subject: Re: is_a, instanceof, conclusion
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-17836@lists.php.net to get a copy of this message
At 10:49 AM 8/11/2005 +0200, Michael Wallner wrote:
Hi Andi Gutmans, you wrote: I don't mind undeprecating it while I continue to digest the whole instanceof thread and look at real-world examples... After all I think there's more hidden behind than just your argument about the generic way...? Why are you defending this broken bridge that hard?
Nothing hidden. I just don't think it's broken. I don't think it'll be terrible to change and I will look into it (actually already have). I do think that people here missed the point though. If your code really requires this functionality then I think there's a problem in most cases. I think for most people in favor it was more a philosophical argument then one backed with massive real world usage... About PEAR, I don't know the code and excuse me if I don't trust your stats :) Andi
You're saying that PHP shouldn't be that dynamic regarding this issue, so why does it try do dynamically load a class within instanceof (which is needless *in every case* anyway)? I think PEAR qualifies as a "real-world" example and there is_a() is used about 680 times, now if that would be instanceof and we assume 10% to check for a non-existing class, it'd bail out at about 70 instances. Regards, -- Michael - < mike(@)php.net >


« previous php.internals (#17836) next »