From: paulschreiber at gmail dot com Operating system: n/a PHP version: 5.2.1 PHP Bug Type: Arrays related Bug description: ER: new count() mode COUNT_RECURSIVE_VALUES
Description: ------------ I would like a new count() mode flag, COUNT_RECURSIVE_VALUES, which counts the values and not the keys. Reproduce code: --------------- $b = array(0 => array(2,3), 1 => array(6,7)); // i see 2 print count($b); // i see 6 print count($b, COUNT_RECURSIVE); // i want to see "4" print count($b, COUNT_RECURSIVE_VALUES); Expected result: ---------------- 2 6 4 Actual result: -------------- 2 6 // error -- Edit bug report at http://bugs.php.net/?id=41009&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41009&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41009&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41009&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41009&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41009&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41009&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41009&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41009&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41009&r=support Expected behavior: http://bugs.php.net/fix.php?id=41009&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41009&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41009&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41009&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41009&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41009&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41009&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41009&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41009&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41009&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41009&r=mysqlcfg