[dev] [commits] Horde-Hatchery branch master updated. 440b7d713281cb240060d754a31bae71484de823

Michael M Slusarz slusarz at horde.org
Tue Jul 28 20:25:48 UTC 2009


Quoting Jan Schneider <jan at horde.org>:

> Zitat von Michael M Slusarz <slusarz at horde.org>:
>
>> commit 488c875b979520b1c9b6bf46049a0ddbb8fd8158
>> Author: Michael M Slusarz <slusarz at curecanti.org>
>> Date:   Mon Jul 27 12:20:53 2009 -0600
>>
>>    No more is_a() -> use instanceof instead
>
> Since is_a() is undeprecated and has the advantage of not triggering  
> autoloading, we should consider to keep using it.

Actually, the autoloading comment is not correct, at least as of PHP  
5.2.  From the PHP instanceof page:

---

There are a few pitfalls to be aware of. Before PHP version 5.1.0,  
instanceof would call __autoload() if the class name did not exist. In  
addition, if the class was not loaded, a fatal error would occur...

The instanceof operator was introduced in PHP 5. Before this time  
is_a() was used but is_a() has since been deprecated in favor of  
instanceof. Note that as of PHP 5.3.0, is_a() is no longer deprecated.

---

michael

-- 
___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list