Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68262 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50353 invoked from network); 20 Jul 2013 07:59:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jul 2013 07:59:13 -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.53 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.215.53 mail-la0-f53.google.com Received: from [209.85.215.53] ([209.85.215.53:49451] helo=mail-la0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7F/41-13120-0534AE15 for ; Sat, 20 Jul 2013 03:59:13 -0400 Received: by mail-la0-f53.google.com with SMTP id fj20so2211951lab.40 for ; Sat, 20 Jul 2013 00:59:09 -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=SUjGiebcHnGtEClM8Bx1XYs/eYLrU0lVi/O2WorpDPg=; b=bi72CaQNVUWsTN779H46DvjLB6VbtuNQ5A4Iw7F/szKdxZrwHx1NFVN1nPJwWBlX2F qdvg5visQkIqFaFEnUhTHk+d0116BBb65VYZATT44pgX7EuMdDlz95T/g6vOkgfEhFAQ Fayi8Xj/niHfCKB8jhq7kOxiOz96PwAldVpN3s+Jq8F7Q7IpfzILMO0tPIrcGy6RSK01 JKeANR6CTH8PspxrvFBz4NQYJEkQLgzznY9qKRnbTUbyxrvU6nvVrDBawIR/IdxJoDmw ri703IDdUHgmbXrSTNT2cd71K9vlO2oGlUFi13gvjneBx3uEUGznZFI7MnTQpxHOQaLD 9XwA== X-Received: by 10.112.59.8 with SMTP id v8mr8498405lbq.85.1374307149326; Sat, 20 Jul 2013 00:59:09 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.4.233 with HTTP; Sat, 20 Jul 2013 00:58:29 -0700 (PDT) In-Reply-To: <51EA4006.7060008@sugarcrm.com> References: <51EA4006.7060008@sugarcrm.com> Date: Sat, 20 Jul 2013 16:58:29 +0900 X-Google-Sender-Auth: MrHKeLVDJCn00siSGWM2gQNB6xA Message-ID: To: Stas Malyshev Cc: PHP internals Content-Type: multipart/alternative; boundary=e89a8f50289472b1dc04e1ecd1a1 Subject: Re: [PHP-DEV] Operator precedence is undefined? From: yohgaki@ohgaki.net (Yasuo Ohgaki) --e89a8f50289472b1dc04e1ecd1a1 Content-Type: text/plain; charset=UTF-8 Hi Stas, 2013/7/20 Stas Malyshev > Hi! > > >> 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. > > Besides that, asking for comments and committing the same day is not > really conductive to a good discussion. Even if nobody objected - which > explicitly wasn't the case - there's nothing that prevented waiting for > a couple of days just to be sure. Please, let us not to be too hasty. > Fair discussion. I'll revert the commit for now. Keeping room for better compilers is good, too. Anyway, the restriction is needed to be documented. How about this explanation? $a = 5, $b = 5 // mixing ++/-- and arithmetic operators may produce // unexpected results, since the evaluation order depends // on compiler implementation. $a = 1; echo ++$a + $a++; // not supported ?> If expression like "echo ++$a + $a++" is not supported for future compilers, PHP is better to raise E_NOTICE if it is easy and fast. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --e89a8f50289472b1dc04e1ecd1a1--