note 129802 added to function.in-array
| From: | aleksandar.todorovic.xyz@gmail.com | Date: | Sat, 12 Oct 2024 08:36:36 +0000 |
| Subject: | note 129802 added to function.in-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-221589@lists.php.net to get a copy of this message | ||
Note that something like following does not work...
$map = [
'string' => "''",
'array' => '[]',
'int' => 1,
'?string' => 'x',
'?array' => 'null',
'?int' => 'null',
];
$find = '?string';
$result = in_array($find, $map);
var_dump($result);
--------------
Output is:
bool(false)
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.137 (proxied: 178.221.23.140)
----
Manual Page -- https://php.net/manual/en/function.in-array.php
Edit -- https://main.php.net/note/edit/129802
Del: integrated -- https://main.php.net/note/delete/129802/integrated
Del: useless -- https://main.php.net/note/delete/129802/useless
Del: bad code -- https://main.php.net/note/delete/129802/bad+code
Del: spam -- https://main.php.net/note/delete/129802/spam
Del: non-english -- https://main.php.net/note/delete/129802/non-english
Del: in docs -- https://main.php.net/note/delete/129802/in+docs
Del: other reasons-- https://main.php.net/note/delete/129802
Reject -- https://main.php.net/note/reject/129802
Search -- https://main.php.net/manage/user-notes.php