On Wed, Jun 29, 2011 at 8:49 PM, Ralph Schindler <ra...@smashlabs.com> wrote: > Correct. > > I was hasty in that example, the first was copied & tested (and is reflected > in the test, as is that variation of what I wrote up.) > > Either way, test and patch work in 5_3.
Doesn't this functionality confuse matters? If this patch is added, is there now no difference between instanceof and is_subclass_of(). If this is the case my question is then why do we have two methods to do the same thing? I thought instanceof was for parent classes + interfaces.. and is_subclass_of() was just for parent classes. Regards, Paul Dragoonis. > > Thanks, > -ralph > > On 6/29/11 2:42 PM, David Zülke wrote: >> >> On 29.06.2011, at 21:39, Ralph Schindler wrote: >> >>> interface A {} >>> class B implements A {} >>> class C extends B {} >>> var_dump(is_subclass_of('B', 'A')); // true >> >> Typo there; that should be 'C', not 'B'. >> >> David >> >> > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php