Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:25313 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27330 invoked by uid 1010); 11 Aug 2006 11:40:41 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 27315 invoked from network); 11 Aug 2006 11:40:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Aug 2006 11:40:41 -0000 X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 209.142.136.132 msa2-mx.centurytel.net Linux 2.4/2.6 Received: from ([209.142.136.132:41606] helo=msa2-mx.centurytel.net) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 75/EC-28296-8BC6CD44 for ; Fri, 11 Aug 2006 07:40:41 -0400 Received: from pc1 (d19-198.rt-bras.wnvl.centurytel.net [69.179.146.198]) by msa2-mx.centurytel.net (8.13.6/8.13.6) with SMTP id k7BBeahj006715; Fri, 11 Aug 2006 06:40:36 -0500 Message-ID: <010f01c6bd3a$f7168980$0201a8c0@pc1> To: , "Andrei Zmievski" References: <005101c6b930$83f30b30$0201a8c0@pc1> Date: Fri, 11 Aug 2006 06:40:37 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Subject: Re: [PHP-DEV] is_numeric_string causes function inconsistency From: php_lists@realplain.com ("Matt W") Hi Andrei, You seem to be the array-function-person ;-) so I'll ask you if the array_count_values() result in my previous message is what's intended? Seems to me leading whitespace should *not* be ignored. I didn't try it yet, but it seems zend_[u_]symtable_[find|update] should simply be used, instead of is_numeric..., and the HANDLE_NUMERIC() macro will take care of things just as with array keys in $a[...]. That's how the function worked in 4.x it appears, where zend_hash_[find|update] had HANDLE_NUMERIC() (before symtable functions). Am I correct? Should I make a patch? Oh, and something I just thought of looking at the code -- you think the function could/should also count IS_DOUBLE values? After converting to string, of course. :-) Thanks, Matt ----- Original Message ----- From: "Matt W" Sent: Sunday, August 06, 2006 > ... > > Also, is this the desired behavior of array_count_values() (manual doesn't > say; it also uses is_numeric...)? > > print_r(array_count_values(array(1, ' 1', ' 1 '))) > Array > ( > [1] => 2 > [ 1 ] => 1 > )