note 50101 added to language.operators.type

From: Date: Fri, 18 Feb 2005 02:37:50 +0000
Subject: note 50101 added to language.operators.type
Groups: php.notes 
Request: Send a blank email to php-notes+get-85188@lists.php.net to get a copy of this message
Negated instanceof doesn't seem to be documented. When I read instanceof I think of it as a compairson operator (which I suppose it's not). <?php class A {} class X {} //parse error from ! if (new X !instanceof A) { throw new Exception('X is not an A'); } //proper way to negate instanceof ? if (!(new X instanceof A)) { throw new Exception('X is not an A'); } ?> ---- Manual Page -- http://www.php.net/manual/en/language.operators.type.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50101 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50101&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50101&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50101&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50101&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50101&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50101&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#85188) next »