Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64907 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7102 invoked from network); 12 Jan 2013 20:13:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Jan 2013 20:13:31 -0000 Authentication-Results: pb1.pair.com header.from=pierre@pcservice.co.za; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre@pcservice.co.za; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain pcservice.co.za designates 69.56.216.30 as permitted sender) X-PHP-List-Original-Sender: pierre@pcservice.co.za X-Host-Fingerprint: 69.56.216.30 gateway07.websitewelcome.com Linux 2.6 Received: from [69.56.216.30] ([69.56.216.30:39211] helo=gateway07.websitewelcome.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 38/B0-24230-9E3C1F05 for ; Sat, 12 Jan 2013 15:13:30 -0500 Received: by gateway07.websitewelcome.com (Postfix, from userid 5007) id A75EA21F79EB6; Sat, 12 Jan 2013 14:13:23 -0600 (CST) Received: from vinacomin.websitewelcome.com (vinacomin.websitewelcome.com [50.97.101.199]) by gateway07.websitewelcome.com (Postfix) with ESMTP id 9CC8D21F79E96 for ; Sat, 12 Jan 2013 14:13:23 -0600 (CST) Received: from [209.85.210.49] (port=42651 helo=mail-da0-f49.google.com) by vinacomin.websitewelcome.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.80) (envelope-from ) id 1Tu7SI-00035U-3i for internals@lists.php.net; Sat, 12 Jan 2013 14:13:26 -0600 Received: by mail-da0-f49.google.com with SMTP id v40so1256295dad.36 for ; Sat, 12 Jan 2013 12:13:24 -0800 (PST) Received: by 10.68.233.201 with SMTP id ty9mr244173165pbc.14.1358021604945; Sat, 12 Jan 2013 12:13:24 -0800 (PST) MIME-Version: 1.0 Reply-To: pierre@pcservice.co.za Received: by 10.68.137.138 with HTTP; Sat, 12 Jan 2013 12:12:54 -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 22:12:54 +0200 Message-ID: To: Thomas Hruska Cc: PHP Development Content-Type: multipart/alternative; boundary=047d7b33d5fc5c2f1904d31d0b55 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vinacomin.websitewelcome.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - pcservice.co.za X-BWhitelist: no X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (mail-da0-f49.google.com) [209.85.210.49]:42651 X-Source-Auth: pierre@pcservice.co.za X-Email-Count: 1 X-Source-Cap: cGNzZXJ2aWM7cGllcnJlO3ZpbmFjb21pbi53ZWJzaXRld2VsY29tZS5jb20= Subject: Re: [PHP-DEV] array_map() function modification From: pierre@pcservice.co.za (Pierre du Plessis) --047d7b33d5fc5c2f1904d31d0b55 Content-Type: text/plain; charset=ISO-8859-1 I'm not sure that adding this functionality in array_map would actually execute faster than doing array_combine($keys, array_map(null, $vals, $vals2, $vals3));. I will need to do some benchmarks to test, but I'm sure you will only see a performance improvement with extremely large arrays. Also why change a function to add functionality that can already be achieved with another existing function? Anybody using array_map is already aware of it's functionality and what it is used for. To change it to add other use cases, which is already available with array_combine, will just be confusing to most developers. If there is a serious need for multiple arrays for values, then I'd rather argue that array_combine be modified to accept multiple arrays, which won't break BC, but I doubt that it would be feasible for the majority developers to have this feature added, as it is very easily implement in user-land with a few lines of code. On Sat, Jan 12, 2013 at 9:41 PM, Thomas Hruska wrote: > array_combine($keys, array_map(null, $vals, $vals2, $vals3)); Kind Regards Pierre du Plessis *Cell*: 072 775 3477 *Fax*: 086 650 4991 *Email*: info@customscripts.co.za *www*: http://www.customscripts.co.za --047d7b33d5fc5c2f1904d31d0b55--