note 123311 added to function.in-array

From: Date: Tue, 06 Nov 2018 13:53:33 +0000
Subject: note 123311 added to function.in-array
Groups: php.notes 
Request: Send a blank email to php-notes+get-209634@lists.php.net to get a copy of this message
If array contain at least one true value, in_array() will return true every times if it is not false or null Use strict = true <?php $arr = array(true); in_array($any, $arr); // Will return true every time except null and false ?> ---- Server IP: 208.43.231.9 Probable Submitter: 178.150.104.1 ---- Manual Page -- http://php.net/manual/en/function.in-array.php Edit -- https://master.php.net/note/edit/123311 Del: integrated -- https://master.php.net/note/delete/123311/integrated Del: useless -- https://master.php.net/note/delete/123311/useless Del: bad code -- https://master.php.net/note/delete/123311/bad+code Del: spam -- https://master.php.net/note/delete/123311/spam Del: non-english -- https://master.php.net/note/delete/123311/non-english Del: in docs -- https://master.php.net/note/delete/123311/in+docs Del: other reasons-- https://master.php.net/note/delete/123311 Reject -- https://master.php.net/note/reject/123311 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#209634) next »