Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62231 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44707 invoked from network); 18 Aug 2012 02:36:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Aug 2012 02:36:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=tjerk.meesters@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tjerk.meesters@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.42 as permitted sender) X-PHP-List-Original-Sender: tjerk.meesters@gmail.com X-Host-Fingerprint: 209.85.210.42 mail-pz0-f42.google.com Received: from [209.85.210.42] ([209.85.210.42:50613] helo=mail-pz0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 32/81-31572-8CFFE205 for ; Fri, 17 Aug 2012 22:36:56 -0400 Received: by dalf4 with SMTP id f4so1098855dal.29 for ; Fri, 17 Aug 2012 19:36:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:in-reply-to:mime-version:content-transfer-encoding :content-type:message-id:cc:x-mailer:from:subject:date:to; bh=BoSSGY32bxbip311OfvpG/aUHgB/4MpfQ6OEENX3MDg=; b=K6d0w1i5QL/7XulG7PdFi4iq/sEJCgHxnwNuISX2BZBbHwEyvzxNpcMI9G7xeQaQsc V5JyFl3OzJ5yKiQ2BUVZJarGiN4pKPRmH031oTUNNghteVLoh6nwYDO7km44cSCLuzdM YIeCwoAwvweax5FEsGIOWPL9zOWjnqT4Jmue+tgNltk8g6KS0+Ub/AqdXaVOpxTXhnMW 2g/W9//yYGjaboW2Gs7MtjdLwopL8UbQU+40LWjCjjnaUOyQvL7vuyMTohffEsAX0ps/ A4XoOKE2G1N+50R4WJyaq43DcErH8T/qaV2y6lcVrs4CFO8MGXaWHjlNYDdmfqyXdUNk OUTg== Received: by 10.68.228.1 with SMTP id se1mr16099709pbc.110.1345257413531; Fri, 17 Aug 2012 19:36:53 -0700 (PDT) Received: from [10.223.49.32] ([111.65.29.61]) by mx.google.com with ESMTPS id pj3sm6088419pbc.53.2012.08.17.19.36.50 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 17 Aug 2012 19:36:51 -0700 (PDT) References: <502EBAA4.9090007@gmail.com> In-Reply-To: <502EBAA4.9090007@gmail.com> Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-ID: <02282E6D-EFB4-44F0-BFA0-60D3E9F9D5B6@gmail.com> Cc: PHP internals list X-Mailer: iPhone Mail (9B206) Date: Sat, 18 Aug 2012 10:36:41 +0800 To: Sebastian Krebs Subject: Re: [PHP-DEV] Combined assignment operator for short ternary From: tjerk.meesters@gmail.com (Tjerk Meesters) Sent from my iPhone On 18 Aug, 2012, at 5:41 AM, Sebastian Krebs wrote: > Hi, >=20 > Don't know, how complicated this is (and also someone (not me) must implem= ent it, because I can't :X), but to be in sync with the operators the short t= ernary 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 >=20 > // instead of > $foo =3D $foo ?: 'default'; > // Just > $foo ?:=3D 'default'; Why not just: $foo ?=3D 'default'; >=20 > I have many of this "default assigments" and yes: This is just syntactic s= ugar. >=20 > Regards, > Sebastian >=20 > --=20 > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20