Newsgroups: php.internals,php.qa Path: news.php.net Xref: news.php.net php.internals:63252 php.qa:66728 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82129 invoked from network); 30 Sep 2012 15:16:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Sep 2012 15:16:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 64.22.89.134 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 64.22.89.134 oxmail.registrar-servers.com Received: from [64.22.89.134] ([64.22.89.134:39102] helo=oxmail.registrar-servers.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 91/00-16417-16268605 for ; Sun, 30 Sep 2012 11:16:52 -0400 Received: from [192.168.0.200] (5ad4bfa1.bb.sky.com [90.212.191.161]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by oxmail.registrar-servers.com (Postfix) with ESMTPSA id B6D41F0026; Sun, 30 Sep 2012 11:16:45 -0400 (EDT) Message-ID: <50686225.20406@ajf.me> Date: Sun, 30 Sep 2012 16:15:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120912 Thunderbird/15.0.1 MIME-Version: 1.0 To: kuldeep dhaka CC: Charlie Somerville , Ferenc Kovacs , php-qa@lists.php.net, PHP Internals References: <781C00C3309B4CAFB5E4B612E94A46C1@charliesomerville.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Funny array function From: ajf@ajf.me (Andrew Faulds) On 30/09/12 13:05, kuldeep dhaka wrote: > i m extending the wordpress internal widget input api to simplify things, > so for that i wanted a function that perform drill. > > i have considered other options but they wont be effecient, if a php > internal function is build it would be just a [] similar one, and most > effecient Not really. A PHP function to implement it, done without recursion, would be pretty efficient. And unless you're making tens of thousands of these operations, this is probably a case of premature optimisation. -- Andrew Faulds http://ajf.me/