I am not stubborn. I just think this has close to 0 use in real-life (or
you're doing some weird coding). In any case, for the one in a million
case, I think Reflection is good enough.
Andi
At 08:40 AM 8/9/2005 +0200, Michael Wallner wrote:
Hi Andi Gutmans, you wrote:
> You are wrong because __autoload() *is* called and you can load the
> class on the-fly. The only problem is if the class does not exist in
> your code base, in which case, your application should blow up!
No insult intended, but this is just stubborn. You want to hear a good
reason/argument, so the reason is that there is no reason
- now please read slowly and thouroughly -
to *load* a class for checking an object to be of a specific class
- just because of the simple reason that the checked object can not
be of *that* class, because it doesn't exist.
So what if the mentioned generic way is too "generic"?
There could be a flag to let instanceof *not* die -
a little less generic but more suited for the actual needs IMO.
It may be too late for 5.1 but it's *never* "too late" for
future considerations.
Regards,
--
Michael - < mike(@)php.net >
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php