Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68247 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23481 invoked from network); 20 Jul 2013 04:27:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jul 2013 04:27:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=theanomaly.is@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=theanomaly.is@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.176 as permitted sender) X-PHP-List-Original-Sender: theanomaly.is@gmail.com X-Host-Fingerprint: 209.85.212.176 mail-wi0-f176.google.com Received: from [209.85.212.176] ([209.85.212.176:40301] helo=mail-wi0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C3/0C-13120-8B11AE15 for ; Sat, 20 Jul 2013 00:27:37 -0400 Received: by mail-wi0-f176.google.com with SMTP id ey16so372685wid.3 for ; Fri, 19 Jul 2013 21:27: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=5RFlFe+V+mQDLuHufaxujBfXXZvt8QDD59MkvCij9R4=; b=tLgwmamFWbPmXdSuQomPDCsdl1xCOF6AplbAUK7pScpKxmX0VR/TKsla1Fse+RQXd5 8KMY/qO2U9kgncpNXJtaFgFmmw5PWY3/7Zr8me72X7AhtzzfQXWDKJRS4nKtzctRVN6x 3ZbB4S+f4v3nRzA0mGGQlZI1PxU1hCp/CaBv+3enEU20uBiUlvseMYXNDf4m33TdlE2G 7X12Qg5/B0xztjYZOt6aXI6RnorfqtftQIbpJNTcFMOuzrySMtNGAVs/GUJl2LNIQsnG sKFmksEvJyWxgYGC9MUFSQuR6g0kbtOsdYVc5tDf1DavlVPUuJQ8plrTGVDikgiEsrgd pA0A== MIME-Version: 1.0 X-Received: by 10.194.22.167 with SMTP id e7mr14333725wjf.68.1374294454436; Fri, 19 Jul 2013 21:27:34 -0700 (PDT) Received: by 10.227.207.6 with HTTP; Fri, 19 Jul 2013 21:27:34 -0700 (PDT) In-Reply-To: References: Date: Sat, 20 Jul 2013 00:27:34 -0400 Message-ID: To: Sara Golemon Cc: Yasuo Ohgaki , PHP internals Content-Type: multipart/alternative; boundary=047d7b5d518ec60c2304e1e9dca9 Subject: Re: [PHP-DEV] Operator precedence is undefined? From: theanomaly.is@gmail.com (Sherif Ramadan) --047d7b5d518ec60c2304e1e9dca9 Content-Type: text/plain; charset=ISO-8859-1 On Fri, Jul 19, 2013 at 11:56 PM, Sara Golemon wrote: > On Fri, Jul 19, 2013 at 7:16 PM, Yasuo Ohgaki wrote: > >> >> >> If there aren't comments, I'll rewrite the example. >> >> >> There were comments. I explicitly told you that that the behavior is > defined as undefined. You CHOSE to ignore that comment. You CHOSE to > break the documentation. > With all due respect, how is the behavior undefined? Our parser defines the precedence of those operators being higher in the precedence table than the ones mentioned. The post inc/dec operators are also well-defined in returning their values "Returns $a, then increments $a by one." at www.php.net/language.operators.increment I present the source as well http://lxr.php.net/xref/PHP_5_5/Zend/zend_compile.c#1196 I'm confused about why you believe this is undefined behavior? Perhaps you can elaborate on why this should be left in the documentation as undefined despite what I believe to be clear evidence of definition. I don't see "discouraged behavior" and "undefined behavior" to be synonymous. I do feel it's OK to place notes/warnings in the manual about discouraged behavior, however, just as we do with nesting ternary operators. --047d7b5d518ec60c2304e1e9dca9--