Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68243 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17716 invoked from network); 20 Jul 2013 04:09:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jul 2013 04:09:33 -0000 Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.160.45 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.160.45 mail-pb0-f45.google.com Received: from [209.85.160.45] ([209.85.160.45:51723] helo=mail-pb0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B4/BA-13120-B7D0AE15 for ; Sat, 20 Jul 2013 00:09:32 -0400 Received: by mail-pb0-f45.google.com with SMTP id mc8so5104510pbc.32 for ; Fri, 19 Jul 2013 21:09:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:x-originating-ip:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :x-gm-message-state; bh=0z/lOAfVR6N7kbeBI8fz9aH047Mmx4N85gRFlRc9EHI=; b=mhODlqMQCNL8M28MmlT+47bzWN8rMnV+/G2flfZyT0lZOZGgUm/3eysyAdeJGx1cby ozwyD+1rn1kXUYnYpfbS7iY7CWDcuBKEuugev1OpIqwalw++cSibNFeUfKWDgaplGb5C wOaAI+WLskkJduZtps/BBQ/FwuwzzyVJHHk0wjTFKNRz9gA/4sfkHr+Y58FLtIkhv4Mv 5BQrWnMcV6+cSk4A6G/ExK3Z58YSR5BVo0xO38a8UNkLVew4Fq4WwnRTUZ6cXHdg8/JE 9moiH4oegl0X1rANrj9XrKwka0UtdxI8sGu4U9XQp1l5yTXLO9fsH/3OiIehedGGNHIB lSCA== MIME-Version: 1.0 X-Received: by 10.68.134.103 with SMTP id pj7mr20032017pbb.171.1374293368947; Fri, 19 Jul 2013 21:09:28 -0700 (PDT) Sender: php@golemon.com Received: by 10.70.128.71 with HTTP; Fri, 19 Jul 2013 21:09:28 -0700 (PDT) X-Originating-IP: [98.210.180.187] In-Reply-To: References: Date: Fri, 19 Jul 2013 21:09:28 -0700 X-Google-Sender-Auth: ZLttHj-QK2JAetOoxjCe93AXbhg Message-ID: To: Tjerk Anne Meesters Cc: Arpad Ray , Daniel Lowrey , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7b10cb2312d52804e1e99c9a X-Gm-Message-State: ALoCoQnDAgHHta/73TDr0PJCSnbLO2BH4vIIlb2K96OrqmV/MYqYh+wcEouhQolAFCokTgHMbpcC Subject: Re: [PHP-DEV] Language constructs and callability From: pollita@php.net (Sara Golemon) --047d7b10cb2312d52804e1e99c9a Content-Type: text/plain; charset=ISO-8859-1 I think the idea comes from a good place, but the actual, practical usefulness of it is so low that the availability of workaround negates even the very small amount of effort it would take to create (and maintain!) shadow functions for the language constructs. array_filter($arr, function($val) { echo $val; }); <--- done. No gymnastics needed. On Fri, Jul 19, 2013 at 8:53 PM, Tjerk Anne Meesters wrote: > On Sat, Jul 20, 2013 at 1:32 AM, Arpad Ray wrote: > > > On Fri, Jul 19, 2013 at 6:28 PM, Daniel Lowrey > wrote: > > > > > While it works, it somewhat obscures what you're trying to accomplish > in > > > the code. The maintainability nightmare alone may be enough to > > > counterbalance any benefits. Then again, who needs > > > readability/maintainability when you can write hopelessly impenetrable > > > code? :) > > > > > > > > Yes, quite, let's just pretend this thread never happened ;) > > > > Let's also pretend I didn't suggest to add a third argument to > array_filter(); > > array_filter($arr, 'is_null', PHP_FILTER_INVERT); > > ;-) > > > > > > Arpad > > > > > > -- > -- > Tjerk > --047d7b10cb2312d52804e1e99c9a--