Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69204 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11277 invoked from network); 18 Sep 2013 16:09:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Sep 2013 16:09:10 -0000 Authentication-Results: pb1.pair.com smtp.mail=leight@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=leight@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.179 as permitted sender) X-PHP-List-Original-Sender: leight@gmail.com X-Host-Fingerprint: 74.125.82.179 mail-we0-f179.google.com Received: from [74.125.82.179] ([74.125.82.179:39517] helo=mail-we0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E1/02-01324-520D9325 for ; Wed, 18 Sep 2013 12:09:09 -0400 Received: by mail-we0-f179.google.com with SMTP id x55so6827080wes.10 for ; Wed, 18 Sep 2013 09:09:06 -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=CQxkFUV3YrlnWt/GbS1xMot0603fhkeT3tFurGbqRDw=; b=ZcHjqSgX93KL2JJNpOYeFbZYAZ79J9bwbjtC6SRr1GeUIF0+YwMnLzySpsS1fEknna 6CbcXIDJk10kHkLgh9vY5Fnn37ppcP0uRfPvi0dmuAoIf/wX5qL/gYgtbYbXh/wxOVjq BM9PJFs4rsYyON7h5ReaCX8zJ05os6Gv20+OxUVa92XgAiWf8E2uInLAFF+u6kmoUxla s0rHSPO7UepaalQF6xG/5GIMMBRJ/hhNoegXGAAe9qhSN0OBO72Z9jASDOTk2VOfBw5X zrBH4McOD36rSk7ERAJBy8KXR1/DY9SeQiZNBrik3FAAac9V0DxaekUl8fPjwaFBryEK XSvw== MIME-Version: 1.0 X-Received: by 10.180.39.242 with SMTP id s18mr7656343wik.47.1379520546616; Wed, 18 Sep 2013 09:09:06 -0700 (PDT) Received: by 10.216.184.3 with HTTP; Wed, 18 Sep 2013 09:09:06 -0700 (PDT) In-Reply-To: References: <49D57F66323040FC9AE48244DAAF3771@gmail.com> <012B9378-3C3A-4169-96D3-3B57D6C7A82C@seancoates.com> Date: Wed, 18 Sep 2013 17:09:06 +0100 Message-ID: To: Patrick ALLAERT Cc: Sean Coates , "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Re: Allowing is_* functions to accept multiple parameters From: leight@gmail.com (Leigh) On 18 September 2013 14:50, Sean Coates wrote: > i.e. is_null($a, $b, $c) would be the same as is_null($a) && is_null($b) > && is_null($c) > > Note that this would not be semantically equivalent in this form, even if > `is_null()` did accept multiple parameters, because of the short-circuiting > with `&&`: See below. On 18 September 2013 15:53, Patrick ALLAERT wrote: > 2013/9/18 Chris London : >> I like the naming convention of are_*. For me personally it isn't directly >> intuitive that the multiple parameters of is_* would be compared with an && >> and not an ||. > > isset() already operates that way, keeping "is_" and implementing it > as originally proposed by Leigh would, at least, be consistent. Indeed, my proposal was to mimic short circuiting as isset() does it, evaluating LTR and returning false at the earliest opportunity.