Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68236 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3435 invoked from network); 20 Jul 2013 02:21:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jul 2013 02:21:38 -0000 Authentication-Results: pb1.pair.com header.from=theanomaly.is@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=theanomaly.is@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.169 as permitted sender) X-PHP-List-Original-Sender: theanomaly.is@gmail.com X-Host-Fingerprint: 209.85.212.169 mail-wi0-f169.google.com Received: from [209.85.212.169] ([209.85.212.169:51394] helo=mail-wi0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 52/18-13120-234F9E15 for ; Fri, 19 Jul 2013 22:21:38 -0400 Received: by mail-wi0-f169.google.com with SMTP id c10so1176532wiw.4 for ; Fri, 19 Jul 2013 19:21:34 -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=rPTRu/YH1p7zkZkCJkjnSQtGf/MxxonK3lrN1bNu9Y4=; b=QimfVZZZG5/15Kxnmh6FUekFq7kTusHeh9+HoOXuVmnZA19j8cLeQBEUUP5JA1H8kD fOVY3e/C8ZCi0HJHsawe2bxPnuBJbml49sit8T0ynoWNVNKsgbdFNA/JPHiM6GasxU5V +LkbkMYqiZj1sEpDdR2k/LmoBQ/PDBiLzD4gi+1cai1qt5+Brl6zTH4bBaWU7BCqFJCT VfsnZGiFpD62iA/E0yP+LSJ81qi9wUkVGhFSmTLRZ0qdQbo/ov+kueDdbepuZcas/LNd zdzKmXQnU28Mb1tmcf++6TCU7IBhuzGBSK+vaKXcsYRmWBuy4vBacev6xslTamko8HMM lb2g== MIME-Version: 1.0 X-Received: by 10.194.9.70 with SMTP id x6mr2984305wja.19.1374286894705; Fri, 19 Jul 2013 19:21:34 -0700 (PDT) Received: by 10.227.207.6 with HTTP; Fri, 19 Jul 2013 19:21:34 -0700 (PDT) In-Reply-To: References: Date: Fri, 19 Jul 2013 22:21:34 -0400 Message-ID: To: Yasuo Ohgaki Cc: Sara Golemon , PHP internals Content-Type: multipart/alternative; boundary=047d7b5d57ce2db1f704e1e81ab1 Subject: Re: [PHP-DEV] Operator precedence is undefined? From: theanomaly.is@gmail.com (Sherif Ramadan) --047d7b5d57ce2db1f704e1e81ab1 Content-Type: text/plain; charset=ISO-8859-1 On Fri, Jul 19, 2013 at 10:16 PM, Yasuo Ohgaki wrote: > Hi Sherif, > > Thank you for your info! > > 2013/7/20 Sherif Ramadan > >> I don't see where there is a bug in the documentation, no. > > > It is in doc's example code. > > 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 would say there is no harm in removing that comment from the documentation. --047d7b5d57ce2db1f704e1e81ab1--