Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46159 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25426 invoked from network); 22 Nov 2009 09:50:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Nov 2009 09:50:05 -0000 Authentication-Results: pb1.pair.com smtp.mail=mls@pooteeweet.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=mls@pooteeweet.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pooteeweet.org from 88.198.8.16 cause and error) X-PHP-List-Original-Sender: mls@pooteeweet.org X-Host-Fingerprint: 88.198.8.16 bigtime.backendmedia.com Linux 2.6 Received: from [88.198.8.16] ([88.198.8.16:38705] helo=bigtime.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0D/40-22148-B49090B4 for ; Sun, 22 Nov 2009 04:50:04 -0500 Received: from localhost (unknown [127.0.0.1]) by bigtime.backendmedia.com (Postfix) with ESMTP id 10BF54144059; Sun, 22 Nov 2009 09:51:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at backendmedia.com Received: from bigtime.backendmedia.com ([127.0.0.1]) by localhost (bigtime.backendmedia.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Tp3RVkSMH413; Sun, 22 Nov 2009 10:51:10 +0100 (CET) Received: from [192.168.0.151] (217-162-131-234.dclient.hispeed.ch [217.162.131.234]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mls@pooteeweet.org) by bigtime.backendmedia.com (Postfix) with ESMTP id 898B54144009; Sun, 22 Nov 2009 10:51:08 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii In-Reply-To: <4B089E43.4050205@lorenso.com> Date: Sun, 22 Nov 2009 10:49:57 +0100 Cc: Rasmus Lerdorf , Alban , internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <4B9F919A-F8B0-40C8-9497-B683CDCA01FB@pooteeweet.org> References: <17.CC.25743.CB6770B4@pb1.pair.com> <84B23126-8011-48DA-B65A-750AA9C5B57E@pooteeweet.org> <4B082F9E.6080703@lerdorf.com> <3982afa90911211329k374ae22co35517e67d7e40f0f@mail.gmail.com> <0D57ED30-E1A5-4F82-9FAE-AB515FB8CAFF@pooteeweet.org> <4B089E43.4050205@lorenso.com> To: dante@lorenso.com X-Mailer: Apple Mail (2.1077) Subject: Re: [PHP-DEV] suggestion about ternary operator From: mls@pooteeweet.org (Lukas Kahwe Smith) On 22.11.2009, at 03:13, D. Dante Lorenso wrote: > Lukas Kahwe Smith wrote: >> On 21.11.2009, at 22:29, Dante Lorenso wrote: >>> I would love to restate my recommendation for the function "filled". >>> Which is the opposite of "empty". Filled would accept a variable >>> number of arguments and return the first where empty evaluates as >>> false. >>>=20 >>> Like empty, filled would not throw notices for undefined variables. >>> This is not the same as the ifsetor debate because filled is = opposite >>> empty and cares not about isset. >> did you even read the RFC? >=20 > Yes I did, and all I see is this in the References section: >=20 > "Suggestion to leave an empty() variant out of the picture since > this feature can be implemented in userland, though this of > course not provide the full functionality of empty() which > does not trigger notices for missing variables" >=20 > I didn't see my proposal listed in it anywhere. See this = recommendation from 3 1/2 years ago: >=20 > - May 03, 2006 > http://www.mail-archive.com/internals@lists.php.net/msg21617.html Maybe I am then misunderstanding your proposal, as to me it is clearly = covered and deemed not possible: http://wiki.php.net/rfc/ifsetor#rejected_features $var =3D ifsetor($var, $var2, "admin"); However this is currently not possible to be implemented without major = slowdowns to the engine. regards, Lukas Kahwe Smith mls@pooteeweet.org