Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82600 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88664 invoked from network); 13 Feb 2015 11:16:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Feb 2015 11:16:52 -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 192.64.116.200 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.200 imap1-2.ox.privateemail.com Received: from [192.64.116.200] ([192.64.116.200:60905] helo=imap1-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 29/15-62214-32DDDD45 for ; Fri, 13 Feb 2015 06:16:51 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id EB4D4B000A1; Fri, 13 Feb 2015 06:16:48 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap1.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap1.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id uJn21wvZuoUX; Fri, 13 Feb 2015 06:16:48 -0500 (EST) Received: from oa-res-26-240.wireless.abdn.ac.uk (oa-res-26-240.wireless.abdn.ac.uk [137.50.26.240]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id EA64BB00092; Fri, 13 Feb 2015 06:16:47 -0500 (EST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) In-Reply-To: <54DDA797.4030501@php.net> Date: Fri, 13 Feb 2015 11:16:35 +0000 Cc: Thomas Punt , "internals@lists.php.net" Content-Transfer-Encoding: quoted-printable Message-ID: References: <54DDA797.4030501@php.net> To: Michael Wallner X-Mailer: Apple Mail (2.2070.6) Subject: Re: [PHP-DEV] [DISCUSSION] Make empty() a Variadic From: ajf@ajf.me (Andrea Faulds) Hey, > On 13 Feb 2015, at 07:28, Michael Wallner wrote: >=20 > On 12/02/15 19:55, Thomas Punt wrote: >=20 >> I'd like to propose to make empty() a variadic, where if any >> arguments passed in are considered empty, then false is returned >=20 > Should that read "if any arguments passed in are considered *NOT* = empty, > then false is returned=94? No, I think it=92s correct, if confusingly phrased. I believe Thomas is = proposing variadic empty() where TRUE is returned if any of its = arguments are empty, otherwise FALSE. So, empty($a, $b, $c) would be = equivalent to empty($a) || empty($b) || empty($c), much like isset($a, = $b, $c) is equivalent to (and implemented as) isset($a) && isset($b) && = isset($c). -- Andrea Faulds http://ajf.me/