Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68231 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93496 invoked from network); 20 Jul 2013 00:36:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jul 2013 00:36:19 -0000 Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.220.53 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.220.53 mail-pa0-f53.google.com Received: from [209.85.220.53] ([209.85.220.53:36994] helo=mail-pa0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A2/36-13120-18BD9E15 for ; Fri, 19 Jul 2013 20:36:18 -0400 Received: by mail-pa0-f53.google.com with SMTP id tj12so5022978pac.12 for ; Fri, 19 Jul 2013 17:36:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:x-originating-ip:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :x-gm-message-state; bh=0d15yqh3rmCpAZ46qvBlsHZld56rqN5Lu4UXYb36au8=; b=RxcCohD33/YpMPp2pmuo366iRNVn2Jaeqjw5aSPbUO2bSHX+eL3h0pZX1XtvgEgg+8 qSUsTVCxMuTUBk2zBImZYYoCQaw4g1L0p9o0XMNshNhmCC4HWAeZiTwOdTHUDhHZpZr8 50ytFb0KWAstoYm9Neh+O1GUsTkkSqze0c4QbN7QdZDM+XYTzVDeFdF3o2fVgNefIODH IksAfDenI7ykRJ2nX40zDHJudsKEC7kEA4Jq721ycqEEYEdYHaMj5KzgOIvVQwdCW6G7 EElLJb48w2z63UYRV+cg1s7yhT/OqoTWENUgsvtia6PpI2OTZDtu7WZmKAuaJmz/qCzv MD4w== MIME-Version: 1.0 X-Received: by 10.68.134.103 with SMTP id pj7mr19420186pbb.171.1374280575369; Fri, 19 Jul 2013 17:36:15 -0700 (PDT) Sender: php@golemon.com Received: by 10.70.128.71 with HTTP; Fri, 19 Jul 2013 17:36:15 -0700 (PDT) X-Originating-IP: [173.252.71.7] In-Reply-To: References: Date: Fri, 19 Jul 2013 17:36:15 -0700 X-Google-Sender-Auth: 06wt6mu-Q2UER8TZvmy4yFExlDc Message-ID: To: Yasuo Ohgaki , PHP internals Content-Type: multipart/alternative; boundary=047d7b10cb2384540c04e1e6a158 X-Gm-Message-State: ALoCoQn8e+T70oj+7M80OlR7ztL/e8W1yk+95D0xVuI6kBU0PyexBskj812EsLmeR8KPPv/nR2c+ Subject: Re: [PHP-DEV] Operator precedence is undefined? From: pollita@php.net (Sara Golemon) --047d7b10cb2384540c04e1e6a158 Content-Type: text/plain; charset=ISO-8859-1 If run right now, it will always produce the same value (4), but it isn't *defined* to do so. What that means is that behavior is subject to change without notice, warning, or justification. This is a somewhat harsh way of saying "Don't write expressions with ambiguous evaluations, that's clowny." I would ask that you don't "fix" the docs, as we want to continue to discourage users from engaging in unsafe behaviors. On Fri, Jul 19, 2013 at 5:12 PM, Yasuo Ohgaki wrote: > Hi all, > > Take a look at this bug report. > > https://bugs.php.net/bug.php?id=65087 > > He complains about documentation of ++/--. > The doc says > > http://www.php.net/manual/en/language.operators.precedence.php > --------------- > // mixing ++ and + produces undefined behavior > $a = 1; > echo ++$a + $a++; // may print 4 or 5 > --------------- > > "may print 4 or 5"?? Undefined?? > In old PHP there may be such limitation. > > I cannot believe this is true now, but I ask list before I fix doc. > > Any comments? > > -- > Yasuo Ohgaki > yohgaki@ohgaki.net > --047d7b10cb2384540c04e1e6a158--