Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69364 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75816 invoked from network); 26 Sep 2013 23:33:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Sep 2013 23:33:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=tjerk.meesters@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tjerk.meesters@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.180 as permitted sender) X-PHP-List-Original-Sender: tjerk.meesters@gmail.com X-Host-Fingerprint: 209.85.216.180 mail-qc0-f180.google.com Received: from [209.85.216.180] ([209.85.216.180:65138] helo=mail-qc0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 97/87-37010-144C4425 for ; Thu, 26 Sep 2013 19:33:21 -0400 Received: by mail-qc0-f180.google.com with SMTP id p19so1266731qcv.11 for ; Thu, 26 Sep 2013 16:33:18 -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=ybdKjTmw4c5i2ohrKeDk9ALQZxMsHfcduS81obquZFo=; b=dFetgLoZKsFlePMH0zImLStVzjPhLP4MaKdqEguzk21eycWldyjurHsECoy7QyscJv KVTQdHnXE0E0zB5BOEdzDz/kgrzwmm+W9V2raH0tAqKc1c6Y44U4J1MDSwC/AJJEbJ08 Fdquc6wAL3EBgebv5S0tr6Z0RV7tQO+K0b1zzheeaXvNNngV5FBD+RiJ34PG9VchlOVw Bbr/57GAONsTnku144cwDFJRAXaoU6uPpdbbfyTivUcChIxrWg6kb7zVb3mg6nQg4pil GPXrBLp7sTth15bgYJXmIs8aOpAkdl1e+1LA9gip4yyv1GIoDkiH8pERLlsjwOwbkzub k66w== MIME-Version: 1.0 X-Received: by 10.49.47.84 with SMTP id b20mr4908044qen.83.1380238398214; Thu, 26 Sep 2013 16:33:18 -0700 (PDT) Received: by 10.49.61.227 with HTTP; Thu, 26 Sep 2013 16:33:18 -0700 (PDT) In-Reply-To: References: <13848974-B5E7-4044-9F04-C4EB15E09E9C@gmail.com> <52446146.7060100@ajf.me> Date: Fri, 27 Sep 2013 07:33:18 +0800 Message-ID: To: Sherif Ramadan Cc: Andrea Faulds , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7b33d3746e58e904e751cb06 Subject: Re: [PHP-DEV] PR 287 - added use_keys argument to array_filter() [Discussion] From: tjerk.meesters@gmail.com (Tjerk Meesters) --047d7b33d3746e58e904e751cb06 Content-Type: text/plain; charset=ISO-8859-1 On Fri, Sep 27, 2013 at 7:11 AM, Sherif Ramadan wrote: > > > > On Thu, Sep 26, 2013 at 6:51 PM, Tjerk Meesters wrote: > >> >> >> I deliberately chose these values so that I can simply specify `true` to >> mean pass both values. Bit masks seem cumbersome in this situation. >> >> > > The default behavior is already to pass the value to the callback. > Requiring the argument only breaks backwards compatibility here. There is > no need for introducing 3 new constants. Simply use PASS_KEY or PASS_BOTH > to solve this problem with the default behavior is pass value if the > argument is omitted. > I agree that only two constants are necessary here to accomplish the same effect; I'll update the code. I didn't quite understand how the current implementation would have BC issues, though. Would you care to elaborate on that? --047d7b33d3746e58e904e751cb06--