Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24865 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24849 invoked by uid 1010); 21 Jul 2006 23:40:25 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 24834 invoked from network); 21 Jul 2006 23:40:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jul 2006 23:40:25 -0000 X-PHP-List-Original-Sender: andrei@gravitonic.com X-Host-Fingerprint: 204.11.219.139 lerdorf.com Linux 2.5 (sometimes 2.4) (4) Received: from ([204.11.219.139:34016] helo=lerdorf.com) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id E0/17-29121-7E561C44 for ; Fri, 21 Jul 2006 19:40:24 -0400 Received: from [192.168.11.5] (c-24-6-96-18.hsd1.ca.comcast.net [24.6.96.18]) (authenticated bits=0) by lerdorf.com (8.13.7/8.13.7/Debian-1) with ESMTP id k6LNeIPB025782; Fri, 21 Jul 2006 16:40:19 -0700 In-Reply-To: <017701c6acc6$3a526be0$0201a8c0@pc1> References: <014e01c6acbe$680b1bc0$0201a8c0@pc1> <10845a340607210543lfe173abq2221a1c833c5d9e1@mail.gmail.com> <017701c6acc6$3a526be0$0201a8c0@pc1> Mime-Version: 1.0 (Apple Message framework v750) X-Priority: 3 Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-ID: Cc: , Content-Transfer-Encoding: 7bit Date: Fri, 21 Jul 2006 16:40:17 -0700 To: Matt W X-Mailer: Apple Mail (2.750) Subject: Re: [PHP-DEV] [PATCH] array_combine is not binary-key safe From: andrei@gravitonic.com (Andrei Zmievski) Yeah, that's probably a good idea. You can submit a patch if you want. :) -Andrei On Jul 21, 2006, at 6:04 AM, Matt W wrote: > Hi Richard, > > I think I've seen those instances that you're referring to. By > fixed length > string I assume you mean hard-coded "string_key". Yeah, I would > think those > should use add_assoc_*_ex() since the length is known (sizeof > ("string_key") > etc.) to save unnecessary strlen() calls. > > Unless compilers optimize the strlen("string_key") + 1 to a > constant from > the add_assoc_*() macro. But I wouldn't think that's the case...? :-/ > > > Matt >