#49202 [NEW]: php array documentation missing information on invalid key return value
| From: | receive at cprogramming dot ca | Date: | Sun, 09 Aug 2009 19:16:12 +0000 |
| Subject: | #49202 [NEW]: php array documentation missing information on invalid key return value | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-2621@lists.php.net to get a copy of this message | ||
From: receive at cprogramming dot ca
Operating system: Web server
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: php array documentation missing information on invalid key return value
Description:
------------
http://uk2.php.net/manual/de/language.types.array.php
There's no explanation in the online documentation of what value is
returned when you access an array with a key/index that doesn't exist.
For example, on line 3, I cannot use the documentation to tell me what
$a["testing_invalid_index"] will return to me. Does it return 0 or "" or
null or false, or does it give an error?
1) $a[] = array();
2) $a["sdfads"] = "booger";
3) if ($a["testing_invalid_index"] == false){
4) echo "Something";
5) }
Reproduce code:
---------------
---
From manual page: language.types.array
---
Expected result:
----------------
Documentation should indicate how an expression containing an array with
an invalid key/index is evaluated.
Actual result:
--------------
Documentation is missing information on how an expression containing an
array with an invalid key/index is evaluated.
--
Edit bug report at http://bugs.php.net/?id=49202&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49202&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49202&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49202&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=49202&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49202&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=49202&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=49202&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=49202&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=49202&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=49202&r=support
Expected behavior: http://bugs.php.net/fix.php?id=49202&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=49202&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=49202&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=49202&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49202&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=49202&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=49202&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=49202&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=49202&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=49202&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=49202&r=mysqlcfg