Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68256 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38102 invoked from network); 20 Jul 2013 05:46:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jul 2013 05:46:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=adam@adamharvey.name; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=adam@adamharvey.name; sender-id=pass Received-SPF: pass (pb1.pair.com: domain adamharvey.name designates 209.85.223.172 as permitted sender) X-PHP-List-Original-Sender: adam@adamharvey.name X-Host-Fingerprint: 209.85.223.172 mail-ie0-f172.google.com Received: from [209.85.223.172] ([209.85.223.172:34564] helo=mail-ie0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DA/2F-13120-7442AE15 for ; Sat, 20 Jul 2013 01:46:47 -0400 Received: by mail-ie0-f172.google.com with SMTP id 17so2915503iea.31 for ; Fri, 19 Jul 2013 22:46:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adamharvey.name; s=google; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=v7hPNN1bxIpHB0yKUJeaeeAlVzaz+kI6FZbWceSyYnQ=; b=rGy6inC9cklqvy2JXdW3yaO+/IVK1gGaEJjm9rUVjN5Zlujgmoqe8c53FWahcaoKM5 cxhNP4GEXKXEfeVQ3NDQUX/4ieFRGxKx+ATpbb0z6eru67Alw8d9QcDU7PCaxbVvqOR2 Baqxwo6zlqk7IcObcyIFAuNSRsC1CTD6tjXOs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=v7hPNN1bxIpHB0yKUJeaeeAlVzaz+kI6FZbWceSyYnQ=; b=TDA79AFe0PeEycUuyP94l5SMt5lUaA1oiqzMN4PS46nSstM1zpHq4iZrFGZVTvH4Pp FE8YNIBDEg+vACl8YRArXUI8wYL8rwfD7e5qHPmh5YJ0GRJP47PswI++lxjeK/LGVLQK jUk0QoPqeU0R4j8ahhJc4zXrQ8dGTQFUAIo2W+DpOZbQoT8QppA+3joQQr2ZnaLIgBaB rlO+jjm/pxz1XmnlFrzSuASs61WznZ4LU8eTn6WWw8s7qfgtbXrIbvzn67eV2MDypy+b QM5cgh9p8wnTIwzds4keYgjEc7JCTM7A69K6wbO99xOIYgfUvMs/z8CLrPIWNUIYLDc+ P+eg== X-Received: by 10.50.111.104 with SMTP id ih8mr14217171igb.28.1374299204090; Fri, 19 Jul 2013 22:46:44 -0700 (PDT) MIME-Version: 1.0 Sender: adam@adamharvey.name Received: by 10.42.169.5 with HTTP; Fri, 19 Jul 2013 22:46:22 -0700 (PDT) In-Reply-To: References: Date: Fri, 19 Jul 2013 22:46:22 -0700 X-Google-Sender-Auth: F7rPqE2vWJFnFvbXxdNpiZ6VJAg Message-ID: To: PHP internals Cc: Sherif Ramadan , Yasuo Ohgaki , Sara Golemon Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQl7H6tmNv13SvwhHqfHaGg5V0j3tnQe8JIqFE+2+XjFrt1Y7kH/d5FCUoXRk9WbSbfAjoJT Subject: Re: [PHP-DEV] Operator precedence is undefined? From: aharvey@php.net (Adam Harvey) (Piggy-backing on Sara's e-mail, although this is more a response to Sherif and Yasuo.) On 19 July 2013 22:33, Sara Golemon wrote: > I never said that the compiler might magically produce differing results > for the same input. I said that the language's definition does not decla= re > a defined behavior for such expressions with combined side effects. This is also a classic piece of undefined behaviour in most C-like languages =E2=80=94 Bjarne Stroustrup lists it in his C++ FAQ, for instance= : http://www.stroustrup.com/bs_faq2.html#evaluation-order. That's not to say that PHP necessarily has to be the same as other languages in its "family" (nested ternaries, anyone?), but I don't think that PHP is really doing anything different here that would make it well defined: AFAIK, the only places PHP makes guarantees about the order of evaluation with regard to binary operators is short circuiting the boolean operators. > As to reverting commits. When the initial commit was made in haste durin= g > an active discussion, a revert is entirely appropriate and has nothing to > do with placing one's opinion over another's. It has to do with placing > the process of consensus building over unilateral cowboy commits. +1. Adam