On his blog today, Pierre has a little something that he's noticed when using instanceof in his OOP programming - a fatal error that's thrown.
The problem is that it raises a fatal error if the tested class does not exist, making instanceof useless in sanity checks or other usages in unknown environment (compiled libs, libs used by a lot of people and have to be as safe as possible (no fatal error for instance).
Since the introduction of instanceof (which is a good thing, works well with the new OO apis), is_a is deprecated. It is obvious as its usage could be replaced by instanceof.
He notes that if you'd like to make a comment to try to support a change to the next release to make it work corretly, you can reply to his post on the phpdev mailing list, and that he has been working on a patch to correct the problem...




