Johannes Schlüter schreef:
> On Sat, 2009-12-19 at 01:42 +0100, Johannes Mueller wrote:
>   
>> if($foo instanceof bar){
>> ..
>> }
>> // runs without any notification
>>     
>
> instanceof is a language construct expecting a class identifier.
> It doesn't complain about on-existing classes as it would need to
> trigger the __autoloader which might be way too much.
>   
Wouldn't it be an idea to make a setting for this ? I find it very
annoying (however understandable) it doesn't complain if I make a typo..
I assume this works the same as try-catch(Exceptio $e); (note the
missing 'n'); which got me fooled before.

(To be sure to be understood: Create a setting which does check the
class-existance; even when autoloading must be called for it)

-- Jille

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to