Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68238 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6509 invoked from network); 20 Jul 2013 02:37:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jul 2013 02:37:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.54 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.215.54 mail-la0-f54.google.com Received: from [209.85.215.54] ([209.85.215.54:58070] helo=mail-la0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1E/B8-13120-0F7F9E15 for ; Fri, 19 Jul 2013 22:37:37 -0400 Received: by mail-la0-f54.google.com with SMTP id ec20so3811383lab.41 for ; Fri, 19 Jul 2013 19:37:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=wg5pqFEmmpfPgHh7We7b07ifDU2bYu6P6sUe2fVvnM0=; b=GmN/JAAbMzBeRGsT0SQ2cZTVMbhK7c6P2oq1WSSfNYnRw7p/8yD0oaNqdXCLxLdFCv g9MJAIjV222sA5N3/rDU6vY4i64pqoQxBAcJlXgvraEhRnJ3tiVBf1qfdXeY0wKpkETk 9NjC1oQdlCoicjlzekdwgZbMHYSvWxeL8kJjDbV35ibrS5QhxUqDrl32zmrX1AwHbCjK XtY4VjxoVdqQrkQeRL4mZGYTMygnSYk01Qs0LyjSYUIddJkrZiYHiWAN19xFdC1qNPxt Mu290Tpe/491uIu4gn6NOnW62khemOigSuSMXX4qi071yH3/oVS2THuf8iufQ2iihAYZ HMtw== X-Received: by 10.112.140.231 with SMTP id rj7mr8693774lbb.16.1374287852835; Fri, 19 Jul 2013 19:37:32 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.4.233 with HTTP; Fri, 19 Jul 2013 19:36:52 -0700 (PDT) In-Reply-To: References: Date: Sat, 20 Jul 2013 11:36:52 +0900 X-Google-Sender-Auth: zlJ2a_skHDdzZt3u5G7vJhxHzW8 Message-ID: To: Sherif Ramadan Cc: Sara Golemon , PHP internals Content-Type: multipart/alternative; boundary=001a11c26a30499a6704e1e85316 Subject: Re: [PHP-DEV] Operator precedence is undefined? From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11c26a30499a6704e1e85316 Content-Type: text/plain; charset=ISO-8859-1 Hi Sheif, 2013/7/20 Sherif Ramadan > Then I would say that example is wrong, but people may find reason to > disagree. I'm basing my contention purely off what I see in php-src and the > documented behavior for those operators. To me I see no reason why this > behavior would be considered undefined. The ternary operator definitely has > some undefined behavior in terms of precedence since its interpreted as a > statement and not like other operators in expressions. To me post/pre > inc/dec are pretty well-defined. > I wasn't going to document ambiguity, but ?: operator's association difference between C and PHP. It's a common pitfall for C programmers when they use nested ternary operators. > I would say there is no harm in removing that comment from the > documentation. > I agree. I'll remove the example. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11c26a30499a6704e1e85316--