Doc #55571 [NEW]: code in user note is misleading

From: Date: Fri, 02 Sep 2011 01:25:38 +0000
Subject: Doc #55571 [NEW]: code in user note is misleading
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-7111@lists.php.net to get a copy of this message
From: Operating system: PHP version: Irrelevant Package: Documentation problem Bug Type: Documentation Problem Bug description:code in user note is misleading Description: ------------ --- From manual page: http://www.php.net/function.is-array --- misleading The post by Xunnamius@DarkGray on 27-Jun-2011 06:31 is confusing testing for an array and testing for an associative array. I spent way too much time trying to figure out how "return ((array) $arr !== $arr);" could possible test for an associative array before I realized it just tests for any array. The name of the functions (is_assoc_3 and is_assoc_4) and the context of comparing them to functions that do test for associative arrays make it appear that the functions do something other than what they do. I was going to post a note explaining this so someone else wouldn't waste their time, but I didn't want to add more clutter to the notes. -- Edit bug report at https://bugs.php.net/bug.php?id=55571&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55571&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55571&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55571&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=55571&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55571&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=55571&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=55571&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=55571&r=needscript Try newer version: https://bugs.php.net/fix.php?id=55571&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=55571&r=support Expected behavior: https://bugs.php.net/fix.php?id=55571&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=55571&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=55571&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=55571&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55571&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=55571&r=dst IIS Stability: https://bugs.php.net/fix.php?id=55571&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=55571&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=55571&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=55571&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=55571&r=mysqlcfg

« previous php.doc.bugs (#7111) next »