Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10990 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93527 invoked by uid 1010); 8 Jul 2004 20:42:59 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 93449 invoked from network); 8 Jul 2004 20:42:58 -0000 Received: from unknown (HELO xaxa.search.ch) (195.141.85.117) by pb1.pair.com with SMTP; 8 Jul 2004 20:42:58 -0000 Received: from localhost (localhost [127.0.0.1]) by xaxa.search.ch (Postfix) with ESMTP id A7DC86CFBF; Thu, 8 Jul 2004 22:42:57 +0200 (CEST) Received: by xaxa.search.ch (Postfix, from userid 65534) id 2E3D66CFB3; Thu, 8 Jul 2004 22:42:55 +0200 (CEST) Received: from cschneid.com (ultrafilter-i [192.168.85.2]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by xaxa.search.ch (Postfix) with ESMTP id 151D96CFBF; Thu, 8 Jul 2004 22:42:52 +0200 (CEST) Message-ID: <40EDB1CB.2080909@cschneid.com> Date: Thu, 08 Jul 2004 22:42:51 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040114 X-Accept-Language: en-us, en, de-ch, de MIME-Version: 1.0 To: Marcus Boerger Cc: Jason Garber , internals@lists.php.net, contact_marcos@yahoo.es References: <5.1.0.14.0.20040707203931.02fa6200@mail.ionzoft.com> <40ED64A0.7050305@cschneid.com> <806386486.20040708205334@marcus-boerger.de> In-Reply-To: <806386486.20040708205334@marcus-boerger.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on xaxa.search.ch X-Spam-Level: X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham version=2.63 X-Virus-Scanned: by AMaViS 0.3.12pre8 Subject: Re: [PHP-DEV] what happened to that new isset() like language From: cschneid@cschneid.com (Christian Schneider) Marcus Boerger wrote: > As i wrote before several times before to me this seems impossible. But > maybe someone can come up with a working patch? I'll have a look at it as soon as I find time (not this week anyway). What I'm looking for is the equivalent of coalesce($a, $b) == @($a ? $a : b) or coalesce($a, $b, $c) == @($a ? $a : ($b ? $b : $c)) e.g. a silenced version of a multi-value ?: operator. Or to go back to my initial example coalesce($_REQUEST['x'], $db->get('x'), 'default_x') == @($_REQUEST['x'] ? $_REQUEST['x'] : ($_x = $db->get('x') ? $_x : 'default_x')) This is definitely not impossible and I consider the silencing of the whole function call inside the coalesce() construct a non-problem. (If someone wanted to do a version where stuff inside function calls aren't silenced any more then one'd need to track the nesting level. I myself wouldn't care.) - Chris