note 118596 deleted from function.count by cmb
| From: | cmb@php.net | Date: | Sat, 09 Jan 2016 01:28:03 +0000 |
| Subject: | note 118596 deleted from function.count by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-204625@lists.php.net to get a copy of this message | ||
Note Submitter: www dot query at gmail dot com
----
I agree with jingsoft at 126 dot com comments about a possible PHP bug.
In PHP 5.1.6 (cli) (built: Nov 6 2014 12:25:07) on Centos 5.11, I create arrays with, for example,
$anum = array;
I add to the array ...
$anum[] = $variable;
Then, after storing 7 items (array items 0-6) I do:-
$count = count($anum);
and get 8.
I can manually count the array items when storing them, so the count's wrong value can be
avoided - it's just annoying because of the wasted time.