Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91645 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80573 invoked from network); 12 Mar 2016 18:16:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Mar 2016 18:16:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.174 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.161.174 mail-yw0-f174.google.com Received: from [209.85.161.174] ([209.85.161.174:33177] helo=mail-yw0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BA/A7-14237-BFC54E65 for ; Sat, 12 Mar 2016 13:16:27 -0500 Received: by mail-yw0-f174.google.com with SMTP id d65so125533813ywb.0 for ; Sat, 12 Mar 2016 10:16:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=vXN++MKYq9U5tokg/yKZylozeO90CeU5AaPsU47esUk=; b=Jy9Ufl7YtGck5htqlnQ/LifwRp1IQxCSOGgKeXTpWwp2WYaOGje3y1XcLO22OsY2T+ y8nwEfccnTKNz+bIVQ5OU4RtOF6DDCRrkNBsjLOKlvjZRwzXWHar5p5NrX5+0nfKXTf/ mFZTm8ubqXFtb4EAKq9ISFKo9x3na261yVPvH6OBRF9+G5BzZSj+kcLuhq9euAlrE9dw 33ihznXrNllz65bLDvHzclf14fF4+axirwaqsigwcqYYM3/+HTCA8fXFozsXBzMBUT/A +JpY/vRS2x/Sawt/AvlAkbAy5NLr9XxFJx7MXquk7SsfSuw/8y3tHei6xj6MPnKsM/gO cqJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=vXN++MKYq9U5tokg/yKZylozeO90CeU5AaPsU47esUk=; b=b6t0mmFexGrdqthfE6LfPsZ5ubIAxZp8ceS0p7yj64ePJqfP3flnSXs06daZhXSSjQ 3yWRwkFr0pyhmMXetwjMHjaDqgNxSF3ct3GqsPYqHqNPFZnRJn4Gatiu4MVi5+41IE7g RagUpRsC1zHweZznn0A7cgSqytpBAZd0SauqHfL3MUbGAP8Fsoj04nTHLCbvF3NspDQQ ZXe8/ETiyNtG64V4RK8GAv9AuA5oyT3RTPLJUPWySbYVdk19aZUMA0f4VuFXnD/OY1hY mmcWQA7RMzwQUkwN7T+e5mdxYkwKssoZyC2j03B0zP5oQDQA4Zj6AIDjDoNEC6fT8VCV Shvw== X-Gm-Message-State: AD7BkJLgxWr8fIQPOpYMPMKS9IqByVZcSBSOq5VO9qAxhB20gxo4LOSrz9Knkk5NvBMvHxisxiat/Js2+pF97g== MIME-Version: 1.0 X-Received: by 10.37.42.88 with SMTP id q85mr8294492ybq.46.1457806584143; Sat, 12 Mar 2016 10:16:24 -0800 (PST) Received: by 10.129.148.70 with HTTP; Sat, 12 Mar 2016 10:16:24 -0800 (PST) In-Reply-To: <321D2AE8-4C59-4739-9D8B-C3A55D5B7D8C@gmail.com> References: <321D2AE8-4C59-4739-9D8B-C3A55D5B7D8C@gmail.com> Date: Sat, 12 Mar 2016 19:16:24 +0100 Message-ID: To: "Paul M. Jones" Cc: Sara Golemon , PHP internals Content-Type: multipart/alternative; boundary=001a1144042c99646e052dde0b1f Subject: Re: [PHP-DEV] Evaluate arguments of new for classes without constructors From: nikita.ppv@gmail.com (Nikita Popov) --001a1144042c99646e052dde0b1f Content-Type: text/plain; charset=UTF-8 On Sat, Mar 12, 2016 at 6:54 PM, Paul M. Jones wrote: > > > On Mar 12, 2016, at 11:27, Sara Golemon wrote: > > > >> HHVM does not implement "new" in this way, they always evaluate the > arguments. > >> > > Which, if it helps, means that we already know a lot of frameworks > > /don't/ break as a result of fixing this behavior. > > > >> As this is technically a BC affecting change (even if of the lowest > >> impact), I'm running it past the list first. > >> > > Technically a BC break that justifies waiting till a major version. > > Given the extremely specific requirements to hit this edge case > > however, passing side-effect args to a non-existent constructor, I > > personally think a minor version is fine. > > Of curiosity, what effect (if any) might this have on > ReflectionClass::newInstance(), ::newInstanceArgs(), and > ::newInstanceWithoutConstructor()? (I ask because some existing DI > systems, such as Aura.Di, rely on those for creating objects.) There is no effect on any the ReflectionClass::newInstance*() methods, only direct use of the "new" operator is affected. Nikita --001a1144042c99646e052dde0b1f--