The answer has to do with subclassing. In PHP 5.3.7 is_a
changed so that if the first argument was not an object, PHP would __autoload
that argument, effectively attempting to make it an object:
> class A {}
> class B extends A {}
> echo is_a('B', 'A');
> // nada
> echo is_a('B', 'A', true);
1
Needless to say, that can lead to some unexpected side-effects and slowdowns, so adding the third argument gives you the choice about which behavior you want.
This all probably started when someone discovered that is_a
and subclass_of
don't behave exactly like instanceof
.