Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67717 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57531 invoked from network); 18 Jun 2013 14:58:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jun 2013 14:58:13 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.169 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.214.169 mail-ob0-f169.google.com Received: from [209.85.214.169] ([209.85.214.169:41059] helo=mail-ob0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 23/93-24847-38570C15 for ; Tue, 18 Jun 2013 10:58:12 -0400 Received: by mail-ob0-f169.google.com with SMTP id up14so4759547obb.14 for ; Tue, 18 Jun 2013 07:58:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=qKjRHukvVmWE64Hk12iNQo9YBBAoqB069pMrAvfZzqg=; b=x0GfPtu3vkn8wR4YbLLbq8x19EAerj3CoCeroqLg2M8R+mlQn5YB6aZ9qeUBV4yoaT OUijyk+IaVk08zSra0ceOWM7G0HOv18w6+o9WBTRvUNMFpImDwZ5uFMVmzcN/N6R1duj +VxogFX5eS8SM8A54a2LTB/Gvc3N5Mou6hcjRfs0JGqw6hbUav/uDAi6Uc342AUMv91Y b3T9fp14ymyJJ9vbm5E+wFF0uqNulJag5CTuL0+/QfKZX+ewE4ZssYHBJwNQQ1s/P6L1 YUn+9/JwD5S08AfFcdb0rR/Vewd6J+4nowMAW8TePRgV4eFwKBAGlKpEGemN+ZQbO4CB aQ0w== MIME-Version: 1.0 X-Received: by 10.60.85.74 with SMTP id f10mr12464586oez.32.1371567487874; Tue, 18 Jun 2013 07:58:07 -0700 (PDT) Received: by 10.76.9.226 with HTTP; Tue, 18 Jun 2013 07:58:07 -0700 (PDT) In-Reply-To: References: Date: Tue, 18 Jun 2013 08:58:07 -0600 Message-ID: To: Sherif Ramadan Cc: PHP Internals Content-Type: multipart/alternative; boundary=089e0111b71ce67ece04df6ef09f Subject: Re: [PHP-DEV] PR 287 - added use_keys argument to array_filter() [Discussion] From: morrison.levi@gmail.com (Levi Morrison) --089e0111b71ce67ece04df6ef09f Content-Type: text/plain; charset=ISO-8859-1 > I'm starting up a thread for discussion on Pull Request 287 > https://github.com/php/php-src/pull/287 (allowing array keys to be passed > to the callback function of array_filter through a third optional boolean > argument). I would like to merge this into master and as discussed on IRC > it would probably be a good idea to startup a discussion and make sure > there aren't any objections or clarifications not yet voiced. > > The patch has no BC because the third argument is optional and defaults to > false. Personally, I have always thought it would be a good idea to be able > to get the keys into the array_filter callback since I've stumbled across a > few scenarios where that would have made things easier. > > I'm not sure if there are any particular down sides to this option being > added, but none that I can find. It currently passes all tests in master > and works as expected. > > Thoughts, opinions, objections, concerns? > > It might be considered a BC break, but I really think we should drop the boolean argument; just have it pass the key as parameter 2 always. --089e0111b71ce67ece04df6ef09f--