Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99322 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85817 invoked from network); 2 Jun 2017 14:33:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jun 2017 14:33:55 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.54 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.54 mail-wm0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:37997] helo=mail-wm0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 79/47-12681-05771395 for ; Fri, 02 Jun 2017 10:33:53 -0400 Received: by mail-wm0-f54.google.com with SMTP id n195so28539628wmg.1 for ; Fri, 02 Jun 2017 07:33:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:user-agent:in-reply-to:references:mime-version :content-transfer-encoding:subject:to:from:message-id; bh=PQdMpTjiGioB5iW7c2Qvi7tA+pTSOxNBn9LNquC2qho=; b=LG3brL1auiOGJE5AzkEB1fAL5hRTPBbAmOvhXcfTI4RVoMSzVjW8s3GH9rGsn6Qjv1 2ldWHcGOSlBA5ZJYEiqrZ1i50EVb0Cl0h4PcCP6Ls/wEsv7VYW/tJjXqUQeLtywTj6m+ U8SDr5Z0IssaSq7K41zZbq5cJh2xBxNoiaEVTZbHgcvRaMyKH9EOjPHKrgvFMF9x9aQe yK6fNpOQpQl5WY9GG3nVOPvObRnmWiqbKTYsyp9vuPMqWgbMoLdtWPJiqJeQ5TjwU3uW zEartwd45sUat1UOeLsSdNHtQ4bltt4Azwd8HaZ7bSDAvLs0RbXRw2tdsTAjG8sx4dT1 1vmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:user-agent:in-reply-to:references :mime-version:content-transfer-encoding:subject:to:from:message-id; bh=PQdMpTjiGioB5iW7c2Qvi7tA+pTSOxNBn9LNquC2qho=; b=UcrHHiwUJ3zQuNu87p3STdyjUealHkn1/n370b53k4iyA81YmaFgeNyybnVQnNRhpF 8YrPzjm5IGgeokcD5SQevmAOz373FKiJPHYifeF+B+o9f1o1oOqn9SKE+PRrPp+o78zR K53N72Qd9GjhyE/BdCQI5tj+A01JyzJnA4GOsuu7dvYVHpaiZlQv1vkr8lvchWOgNXQB cnlmGd1OHN6D7j4cuu4yBYXljdgEsSxAYBOkF45EYb/yBZogashxla4a5g0otlVPLXW4 tsSyr5rDjFap+XCojO+HBfgFx8Y21BimoX62S6NWsbKWllhwffCFr7rdJBPdt8aL9OI+ OWTg== X-Gm-Message-State: AODbwcCBK1cTvSOANCpRagm4sraM7xRcvpLYP1wJW1VLLcyIEKdEafLT bJgHVPEdCIP7kp2+UTE= X-Received: by 10.28.71.147 with SMTP id m19mr2995512wmi.92.1496414028829; Fri, 02 Jun 2017 07:33:48 -0700 (PDT) Received: from [10.7.17.11] (188.29.165.251.threembb.co.uk. [188.29.165.251]) by smtp.gmail.com with ESMTPSA id r130sm2938183wmg.4.2017.06.02.07.33.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Jun 2017 07:33:47 -0700 (PDT) Date: Fri, 02 Jun 2017 15:33:45 +0100 User-Agent: K-9 Mail for Android In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable To: internals@lists.php.net Message-ID: <8C6FB7B4-9A79-4570-AEAC-F3C56238AA89@gmail.com> Subject: Re: [PHP-DEV] RFC proposal From: rowan.collins@gmail.com (Rowan Collins) On 2 June 2017 14:21:38 BST, "Bart=C5=82omiej Krukowski" wrote: > There is an >option to >use variable as implicit reference (@see example - >http://ideone=2Ecom/T6oF7C >), I think it should not be possible=2E Only >explicit references should be allowed (except objects)=2E So in summary: a function given an array (or object) containing items assi= gned by reference can unknowingly "leak" its internal processing of that ar= ray=2E It's certainly an interesting case, but what is the alternative behaviour = you would propose? Just banning all assignment to array items by reference = would stop this, but also remove a potentially useful feature=2E Detecting or defeating this situation at the time a function is called mig= ht prove expensive in terms of processing and memory (e=2Eg=2E unnecessaril= y cloning values), and the result would be a compatibility break for anyone= using this, so it would require careful consideration=2E [Note: the convention on this list is to reply below quoted text, not abov= e, when replying=2E] Regards, --=20 Rowan Collins [IMSoP]