Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24833 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91711 invoked by uid 1010); 21 Jul 2006 12:28:45 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 91695 invoked from network); 21 Jul 2006 12:28:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jul 2006 12:28:45 -0000 X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 69.179.208.43 msa3-mx.centurytel.net Linux 2.4/2.6 Received: from ([69.179.208.43:38356] helo=msa3-mx.centurytel.net) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 17/F9-29121-BC3C0C44 for ; Fri, 21 Jul 2006 08:08:45 -0400 Received: from pc1 (d14-111.rt-bras.wnvl.centurytel.net [69.179.141.111]) by msa3-mx.centurytel.net (8.13.6/8.13.6) with SMTP id k6LC8esT008387 for ; Fri, 21 Jul 2006 07:08:40 -0500 Message-ID: <014e01c6acbe$680b1bc0$0201a8c0@pc1> To: Date: Fri, 21 Jul 2006 07:08:41 -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: [PATCH] array_combine is not binary-key safe From: php_lists@realplain.com ("Matt W") Hi, I don't know if array_combine() was intentionally made binary-key unsafe, but it seems wrong and inconsistent since binary keys work everywhere else I can think of -- including array_flip() and the new array_fill_keys(). And updating it is a bit of an optimization by eliminating strlen() calls. :-) I also changed the error message to be more grammatically-correct and fixed some typos in the description. http://www.realplain.com/php/array_combine_binkey.diff http://www.realplain.com/php/array_combine_binkey_5_2.diff Thanks, Matt