Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62461 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58988 invoked from network); 24 Aug 2012 21:15:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Aug 2012 21:15:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.42 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.160.42 mail-pb0-f42.google.com Received: from [209.85.160.42] ([209.85.160.42:40319] helo=mail-pb0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1A/86-24287-4FEE7305 for ; Fri, 24 Aug 2012 17:15:33 -0400 Received: by pbbrp8 with SMTP id rp8so4129366pbb.29 for ; Fri, 24 Aug 2012 14:15:30 -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=3BIXDLLMe2J7QNGaF1dlzOCjYPxYEXEMEoBXhj6tMAQ=; b=aKvdjbQeMcimx6kt0lv9+sjMsFwgoU7HJiePETfViQ1tjIGlSL/ttcfPCjbPojVKKX HsPvieD+ncJLmuESaPj8gWrf6BvwmlaqjShgHS9e1ChWjShss/0f7hl/L49ITTeU9TDe bX6TI55pUiwZxRc6aYYI/ZdvxeAHSF8O3yGq8y//AJwGZEC4jFjGwTkMGmneY59ewxDG 79D1DTRHaWzlMDHZQJya+iTYSN8dXt7C6ow6jlZkAb/SKp7eWEn0BtHPKAyek/FVYITM /Slrx2X3ZzgOgCiFmpy2sa5s4j6KS0s5goqqQk6OjXzBjfOeAdpxWlsbJbBm1hvu5nLX fBXw== MIME-Version: 1.0 Received: by 10.66.75.167 with SMTP id d7mr5062645paw.10.1345842930409; Fri, 24 Aug 2012 14:15:30 -0700 (PDT) Received: by 10.68.211.37 with HTTP; Fri, 24 Aug 2012 14:15:30 -0700 (PDT) In-Reply-To: References: Date: Fri, 24 Aug 2012 23:15:30 +0200 Message-ID: To: Alex Aulbach Cc: Andrew Faulds , Stas Malyshev , Christoph Hochstrasser , "Matthew Weier O'Phinney" , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=f46d042f9ef6ca61f604c8097915 Subject: Re: [PHP-DEV] Implicit isset in ternary operator From: tyra3l@gmail.com (Ferenc Kovacs) --f46d042f9ef6ca61f604c8097915 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, Aug 3, 2012 at 12:26 AM, Alex Aulbach wrote= : > 2012/8/2 Andrew Faulds : > > Hi, > > > > Also in JavaScript if in strict mode. Legacy non-strict mode JS doesn't > cause an error though. > > > > JS's || operator supresses this error though, which is great for e.g. x > =3D x || new Object(); > > Could be cool to make this in PHP with the 'or' operator (or not ||)... > Which brings us back to the subject... > > -- > Alex Aulbach > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > most/some of the ideas here were brought up before, there is a proposal and a nice history of mailing list discussions (albeit not up-to-date) at https://wiki.php.net/rfc/ifsetor personally I would really like an ifsetor/coelesce kind of language construct. accepts any number of arguments, won't trigger notice on unset variables, and returns the first non-null argument. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --f46d042f9ef6ca61f604c8097915--