note 103459 added to language.operators.type

From: Date: Thu, 14 Apr 2011 13:29:28 +0000
Subject: note 103459 added to language.operators.type
Groups: php.notes 
Request: Send a blank email to php-notes+get-178826@lists.php.net to get a copy of this message
returns true for any ancestor class, not just immediate superclasses. php -r "class Mammal{}; class Primate extends Mammal {}; class Human extends Primate{}; \$h=new Human(); echo (\$h instanceof Mammal)?'Yes':'no';" Yes ---- Server IP: 69.147.83.197 Probable Submitter: 213.190.149.215 (proxied: 213.190.149.194) ---- Manual Page -- http://www.php.net/manual/en/language.operators.type.php Edit -- https://master.php.net/note/edit/103459 Del: integrated -- https://master.php.net/note/delete/103459/integrated Del: useless -- https://master.php.net/note/delete/103459/useless Del: bad code -- https://master.php.net/note/delete/103459/bad+code Del: spam -- https://master.php.net/note/delete/103459/spam Del: non-english -- https://master.php.net/note/delete/103459/non-english Del: in docs -- https://master.php.net/note/delete/103459/in+docs Del: other reasons-- https://master.php.net/note/delete/103459 Reject -- https://master.php.net/note/reject/103459 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#178826) next »