Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64905 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4305 invoked from network); 12 Jan 2013 20:06:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Jan 2013 20:06:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=ww.galen@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ww.galen@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.176 as permitted sender) X-PHP-List-Original-Sender: ww.galen@gmail.com X-Host-Fingerprint: 209.85.212.176 mail-wi0-f176.google.com Received: from [209.85.212.176] ([209.85.212.176:39474] helo=mail-wi0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D4/10-24230-262C1F05 for ; Sat, 12 Jan 2013 15:06:58 -0500 Received: by mail-wi0-f176.google.com with SMTP id hm6so502018wib.3 for ; Sat, 12 Jan 2013 12:06:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=KaAZnmx0LDRTLfK85R0aktMw0TGB4Sk14bISB4EBwaE=; b=JBt7J1le4T6O7dzvTFwdR1DB48rQT/ivhbmyACeGHbCN1DihlAvUeK+bnTWLqxCTof DjK/WE/eA/K4ZWhROfKRAyuf9yqX+/g/CZEOXdkMBM+BrDtzlwOaWJoS00S4yHi3dVN9 nZx3jR4GR/WqhUNIncOqFjzE65h3DtXXSawRYlffd55N3bYnkzl1me+NY7PR0Kfiq8vD DAa8NnRPgxHH5AJPu0t7eZYSW/OFCCLUTpL19fGYQIMsfOGEEk7Ha3WLMyIgwyzmIaUh CKPcfnJJmdKXrBUgOxR2QBH2JIYczjoAl50XB/4eT4zlw2RICgbghwVglWcYaPTMPG99 dY7A== Received: by 10.194.171.198 with SMTP id aw6mr114018383wjc.3.1358021215258; Sat, 12 Jan 2013 12:06:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.217.39.193 with HTTP; Sat, 12 Jan 2013 12:06:15 -0800 (PST) In-Reply-To: <50F1BC83.30800@cubiclesoft.com> References: <50F19EA2.8040600@cubiclesoft.com> <50F07A56-A414-434F-804D-1E5B7039F728@gmail.com> <50F1BC83.30800@cubiclesoft.com> Date: Sat, 12 Jan 2013 12:06:15 -0800 Message-ID: To: Thomas Hruska Cc: PHP Development Content-Type: multipart/alternative; boundary=089e0122f58e2206a604d31cf4e3 Subject: Re: [PHP-DEV] array_map() function modification From: ww.galen@gmail.com (Galen Wright-Watson) --089e0122f58e2206a604d31cf4e3 Content-Type: text/plain; charset=ISO-8859-1 On Sat, Jan 12, 2013 at 11:41 AM, Thomas Hruska wrote: > [...] > > The array_map() changes would allow for multiple arrays of values: > > array_map($keys, $vals, $vals2, $vals3); > [...] > > But it would execute faster if it were supported in array_map(). If it is > supported in array_map(), then array_combine() could call array_map() and > could potentially just be an alias to array_map(). > > Alternatively, array_combine() could be made variadic, adding your proposed behavior (which is more in line with the current behavior of array_combine() than array_map()). Speaking of, On Sat, Jan 12, 2013 at 9:34 AM, Thomas Hruska wrote: > [...] > > In addition, passing multiple value arrays would do something naturally in > line with the rest of how array_map() works now but with keys sourced from > the keys array. > Just to be clear, do you mean the result would be: array($keys[0] => array($vals0[0], $vals1[0], ...), $keys[1] => array($vals0[1], $vals1[1], ...), ...) so the i-th item in the result would be an array with the i-th items of each value array, and the i-th item of the key array as the key? --089e0122f58e2206a604d31cf4e3--