note 108618 added to function.array-key-exists
| From: | AhmsariFordat | Date: | Fri, 11 May 2012 02:36:48 +0000 |
| Subject: | note 108618 added to function.array-key-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-187927@lists.php.net to get a copy of this message | ||
If you want to use isset (for speed) instead of using the more rigorous (for correctness)
array_key_exists, you may see the following error in your logs as the compiler falls over:
PHP Fatal error: Can't use function return value in write context
Take heart - many examples show $array($key) - which is apparently wrong for some of us. Try using
the normal bracket syntax - $array[$key] - and you'll soon be back on track.
----
Server IP: 69.147.83.197
Probable Submitter: 71.221.192.249
----
Manual Page -- http://www.php.net/manual/en/function.array-key-exists.php
Edit -- https://master.php.net/note/edit/108618
Del: integrated -- https://master.php.net/note/delete/108618/integrated
Del: useless -- https://master.php.net/note/delete/108618/useless
Del: bad code -- https://master.php.net/note/delete/108618/bad+code
Del: spam -- https://master.php.net/note/delete/108618/spam
Del: non-english -- https://master.php.net/note/delete/108618/non-english
Del: in docs -- https://master.php.net/note/delete/108618/in+docs
Del: other reasons-- https://master.php.net/note/delete/108618
Reject -- https://master.php.net/note/reject/108618
Search -- https://master.php.net/manage/user-notes.php