note 99376 added to language.operators.type

From: Date: Fri, 13 Aug 2010 14:37:35 +0000
Subject: note 99376 added to language.operators.type
Groups: php.notes 
Request: Send a blank email to php-notes+get-171648@lists.php.net to get a copy of this message
In my humble opinion, the second var_dump(...) call in example #5 should return false, regardles of PHP traditions. The variable $a does NOT contain an instance of a String. The instanceof operator should not look at the VALUE of $c, merely it's type. I am unaware of the internals of this operator, but it seems inefficient (involving a possible strcmp) and inconsistent. ---- Server IP: 69.147.83.197 Probable Submitter: 184.74.90.214 ---- Manual Page -- http://www.php.net/manual/en/language.operators.type.php Edit -- https://master.php.net/note/edit/99376 Del: integrated -- https://master.php.net/note/delete/99376/integrated Del: useless -- https://master.php.net/note/delete/99376/useless Del: bad code -- https://master.php.net/note/delete/99376/bad+code Del: spam -- https://master.php.net/note/delete/99376/spam Del: non-english -- https://master.php.net/note/delete/99376/non-english Del: in docs -- https://master.php.net/note/delete/99376/in+docs Del: other reasons-- https://master.php.net/note/delete/99376 Reject -- https://master.php.net/note/reject/99376 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#171648) next »