Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92057 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30412 invoked from network); 1 Apr 2016 01:37:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Apr 2016 01:37:17 -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.161.175 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.161.175 mail-yw0-f175.google.com Received: from [209.85.161.175] ([209.85.161.175:33945] helo=mail-yw0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 04/E7-15473-BC0DDF65 for ; Thu, 31 Mar 2016 20:37:15 -0500 Received: by mail-yw0-f175.google.com with SMTP id h129so126225671ywb.1 for ; Thu, 31 Mar 2016 18:37:15 -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:message-id :subject:to:cc; bh=UTr1J7hIwFEmhNY1VW2G2mxzgQg0/PCV5WWik0VzAWo=; b=jWUA1jGhSNIYSqKl1btyf0M/ckSeOSf7jSR4beRabYqkVkqvAZYIunfkrzlLxlTHMH zXDXebV/sd28A/CUeEYe+pZf3zKdLJwQU0lMIbOtPw7qf1ksDMAFjPoH4tQfvxvDOXu0 FFuypKl7mdxiMXw7SbatMDaQWNAdkApg3XVlnXtANcyPTR8B8RZIuospOckRC5ZLpqKM 73b0ZOTuX27a5IBGxDecmfidzMiOIrNsy7dYd3FW/yD3P5NEIXEoulcGMjpqFPDAR5Q1 1nxM8cYIzPQ22rQX/UOkPubx95eUmsS8GLKf+qNEi5wnvBthpVFGGqhhe5np0vyBy+Hx +iww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=UTr1J7hIwFEmhNY1VW2G2mxzgQg0/PCV5WWik0VzAWo=; b=Ah0mQEGQiLbNNVnGGolO6sPWDpSKVL2HbxyF3dSlURpZRYVUGMaHXKyYqJOAcojQdt eKXdrnHrdTqQC6XTCrnA6WwQRsd3p3K4MR8MJ0h3S7PhBupszw51HmHIYrYdLalzx/Jl fyIA3gFJLV9fQ3aEOxRadhP8S5TJKkizm1a5sYQa4IzkL2QgBPy5XUNekg2pIpinuDu5 LvbyTkbiG1i+XGTVmhpVcZamvMbY1j2uzSgWATzDo4deu9IpaQaPf6O7x9h1v+viehPs 2szHSDLlWfIqiOa0AEo1QHJgFicETuM0OLyfcs0JLVcHaHbdO0dL54zdOSz5rA7BvYnH rmUg== X-Gm-Message-State: AD7BkJKtg3TqlQEKvM0bIh2g2Jm0j0k780bJ/+mEwFmrMG2ppeULVSjmbDC+udCjvhx7cn0xsV+KSaDJGe8itQ== X-Received: by 10.31.21.4 with SMTP id 4mr1026105vkv.151.1459474632350; Thu, 31 Mar 2016 18:37:12 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.159.40.7 with HTTP; Thu, 31 Mar 2016 18:36:32 -0700 (PDT) In-Reply-To: References: Date: Fri, 1 Apr 2016 10:36:32 +0900 X-Google-Sender-Auth: c4G10wMvaw-ZfQMExeQeefHBhYc Message-ID: To: Huqiu Liao Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Copy On Write and Assign By Reference perform different on PHP5 and PHP7 From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi Huqui, On Fri, Apr 1, 2016 at 1:47 AM, Huqiu Liao wrote: > 4 echo (++$i) + (++$i); I brought up this topic before and the conclusion is This kind of operation result is undefined and user shouldn't write such expression. There are undefined behaviors for ++ and --. C/C++ has undefined behavior for ++/-- https://en.wikipedia.org/wiki/Undefined_behavior#Examples_in_C_and_C.2B.2B Some languages do not have these operators for this reason. PHP may define behavior for these, but it is undefined for future improvements. (And behavior is changed in PHP 7.0) Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net