note 124740 added to function.array-key-exists
| From: | Md.Abutaleb@php.net | Date: | Thu, 20 Feb 2020 05:51:52 +0000 |
| Subject: | note 124740 added to function.array-key-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-214177@lists.php.net to get a copy of this message | ||
Extending from here : https://www.php.net/manual/en/function.array-key-exists.php#90687
<?php
# Working for null check
# Warning for boolean check
# Warning for float check
$a = array(null => 1, false => 2, true => 3, 4.6 => 4, "08" => 5,
"8" => 6);
var_dump(array_key_exists(null, $a)); // true
var_dump(array_key_exists(false, $a)); // warning and false
var_dump(array_key_exists(true, $a)); // warning and false
var_dump(array_key_exists(4.6, $a)); // warning and false
(array_key_exists("08", $a)); // true
var_dump(array_key_exists(8, $a)); // true
?>
----
Server IP: 45.112.84.4
Probable Submitter: 185.85.3.195 (proxied: 182.160.98.85)
----
Manual Page -- http://php.net/manual/en/function.array-key-exists.php
Edit -- https://master.php.net/note/edit/124740
Del: integrated -- https://master.php.net/note/delete/124740/integrated
Del: useless -- https://master.php.net/note/delete/124740/useless
Del: bad code -- https://master.php.net/note/delete/124740/bad+code
Del: spam -- https://master.php.net/note/delete/124740/spam
Del: non-english -- https://master.php.net/note/delete/124740/non-english
Del: in docs -- https://master.php.net/note/delete/124740/in+docs
Del: other reasons-- https://master.php.net/note/delete/124740
Reject -- https://master.php.net/note/reject/124740
Search -- https://master.php.net/manage/user-notes.php