Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62259 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82646 invoked from network); 19 Aug 2012 14:58:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Aug 2012 14:58:16 -0000 Authentication-Results: pb1.pair.com header.from=krebs.seb@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=krebs.seb@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.170 as permitted sender) X-PHP-List-Original-Sender: krebs.seb@gmail.com X-Host-Fingerprint: 74.125.82.170 mail-we0-f170.google.com Received: from [74.125.82.170] ([74.125.82.170:42698] helo=mail-we0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 90/D1-03087-70FF0305 for ; Sun, 19 Aug 2012 10:58:16 -0400 Received: by weyr1 with SMTP id r1so4014023wey.29 for ; Sun, 19 Aug 2012 07:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=pc60CioDiJB9Kn/52vTJ47k8UF80vbQSr9ubyLh6sqA=; b=wtIZCJfr1TxB/TN1hW2r7fEzF4kEp+uw2r6L65nHHpOuGk/BfNEpdBMP19PXYcUPXe mFxBpALDo1RwwNwRnP3ujeRRh43eaOylE/jj6TzrxAqhBdatAMWn2qDVOmrMiGIXr04b 2VyJ+tKVe3BQwm8fdagp5/k54uzu+0NVijAVg6Idtf4YQBqGUkLeHmE290MQKKf8jFKf c2y1IlBeZBPoa7Vlmc7vKsvc3Z7WB0zhT7Ra+dfGtWQID98Opr10RW3/C66760/D1BTF 8F2+zvcHF9oaILe8KBIrOF8Y+buAk/lCPAQjCMX0BegbOBFxF7+OVELMCEp+85lfjIxs DIzQ== Received: by 10.180.99.196 with SMTP id es4mr20317413wib.18.1345388293221; Sun, 19 Aug 2012 07:58:13 -0700 (PDT) Received: from [192.168.24.2] (91-66-42-108-dynip.superkabel.de. [91.66.42.108]) by mx.google.com with ESMTPS id ef5sm33508881wib.3.2012.08.19.07.58.12 (version=SSLv3 cipher=OTHER); Sun, 19 Aug 2012 07:58:12 -0700 (PDT) Message-ID: <5030FF03.9000506@gmail.com> Date: Sun, 19 Aug 2012 16:58:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: PHP internals list References: <502EBAA4.9090007@gmail.com> <02282E6D-EFB4-44F0-BFA0-60D3E9F9D5B6@gmail.com> <50301516.7050906@ajf.me> In-Reply-To: <50301516.7050906@ajf.me> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Combined assignment operator for short ternary From: krebs.seb@gmail.com (Sebastian Krebs) Am 19.08.2012 00:20, schrieb Andrew Faulds: > On 18/08/12 03:36, Tjerk Meesters wrote: >> >> Sent from my iPhone >> >> On 18 Aug, 2012, at 5:41 AM, Sebastian Krebs wrote: >> >>> Hi, >>> >>> Don't know, how complicated this is (and also someone (not me) must >>> implement it, because I can't :X), but to be in sync with the >>> operators the short ternary operator should be usable in conjunction >>> with the assignment like the other binary operators. Don't know, if >>> anybody understands me :D So here is an example >>> >>> // instead of >>> $foo = $foo ?: 'default'; >>> // Just >>> $foo ?:= 'default'; >> Why not just: $foo ?= 'default'; > Just noting, I made a ML email earlier about this, except it would be > shorthand for isset($lval) ? $lval : $default. And this has been brought > up before several times. The "except" is important: I don't want to change the behaviour in any way. >>> I have many of this "default assigments" and yes: This is just >>> syntactic sugar. >>> >>> Regards, >>> Sebastian >>> >>> -- >>> PHP Internals - PHP Runtime Development Mailing List >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> > >