Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62228 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25605 invoked from network); 17 Aug 2012 21:42:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Aug 2012 21:42:01 -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 209.85.214.42 as permitted sender) X-PHP-List-Original-Sender: krebs.seb@gmail.com X-Host-Fingerprint: 209.85.214.42 mail-bk0-f42.google.com Received: from [209.85.214.42] ([209.85.214.42:47085] helo=mail-bk0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E6/BE-47492-8AABE205 for ; Fri, 17 Aug 2012 17:42:01 -0400 Received: by bkcjm19 with SMTP id jm19so1554229bkc.29 for ; Fri, 17 Aug 2012 14:41:58 -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 :content-type:content-transfer-encoding; bh=6w1DdPI70JY7yC8yzsba9hoUk0UeY8Hp7pG5XuXCxv0=; b=aS5TtuzMqlBjafQKNROWhoKtXdzcahrGSiZ0+NpbrRHoRUD3xwRaHmKmSMbIDZRLYk Q/iOBRB9HqtMivg7ZBbXYcaU2KEzl9VZDy8gNZznYztzFdNnEbztnMfeNtc9NTSJZXwF BGOh7RaBPHEr1KA0DNM3PNVZHUu2GZXHB2M1MMmDdPXNzAzwPagCPTrqGMNgJ1e6gp7L eZTA/zC7kNM3VSUx1BbkMZ0quI3vGT96NAU11U6bGWgSErS9Ic9Cyo2jMk0H2Z0u1Iy9 oefVwa2lKgFn22ixG9q53J6BGuQodZd4BYIeuxAtaCOv55tRvAl9Q81Qzw9UgwZBsq6f Rzdw== Received: by 10.204.152.6 with SMTP id e6mr2498754bkw.85.1345239718027; Fri, 17 Aug 2012 14:41:58 -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 n17sm4043757bks.6.2012.08.17.14.41.57 (version=SSLv3 cipher=OTHER); Fri, 17 Aug 2012 14:41:57 -0700 (PDT) Message-ID: <502EBAA4.9090007@gmail.com> Date: Fri, 17 Aug 2012 23:41:56 +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 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Combined assignment operator for short ternary From: krebs.seb@gmail.com (Sebastian Krebs) 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'; I have many of this "default assigments" and yes: This is just syntactic sugar. Regards, Sebastian