note 124168 added to function.in-array

From: Date: Wed, 04 Sep 2019 11:43:17 +0000
Subject: note 124168 added to function.in-array
Groups: php.notes 
Request: Send a blank email to php-notes+get-212095@lists.php.net to get a copy of this message
in_array() may also return NULL if the second argument is NULL and strict types are off. <?php var_dump(in_array(1, null)); ?> The output is NULL If the strict mode is on, then this code would end up with the TypeError ---- Server IP: 208.43.231.9 Probable Submitter: 185.85.3.168 (proxied: 83.239.55.114) ---- Manual Page -- http://php.net/manual/en/function.in-array.php Edit -- https://master.php.net/note/edit/124168 Del: integrated -- https://master.php.net/note/delete/124168/integrated Del: useless -- https://master.php.net/note/delete/124168/useless Del: bad code -- https://master.php.net/note/delete/124168/bad+code Del: spam -- https://master.php.net/note/delete/124168/spam Del: non-english -- https://master.php.net/note/delete/124168/non-english Del: in docs -- https://master.php.net/note/delete/124168/in+docs Del: other reasons-- https://master.php.net/note/delete/124168 Reject -- https://master.php.net/note/reject/124168 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#212095) next »