Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76519 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93702 invoked from network); 14 Aug 2014 15:40:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Aug 2014 15:40:03 -0000 Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.173 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 209.85.220.173 mail-vc0-f173.google.com Received: from [209.85.220.173] ([209.85.220.173:35476] helo=mail-vc0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 50/29-40673-F48DCE35 for ; Thu, 14 Aug 2014 11:40:00 -0400 Received: by mail-vc0-f173.google.com with SMTP id hy10so1602260vcb.32 for ; Thu, 14 Aug 2014 08:39:56 -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:content-type; bh=23QGbn/Hciv/avi6rS3T0Wa114xRdh7+ThmcT5nk3sE=; b=fj3Ju/Kyz2g8pKpTo3leNYfcSbig7CIAOgetzqsW5hhXJFVLsG6LC1dOXCVawDsr+K KgmiVVNSsqF5+nuq/YQ0fhZ8lG3mEGTCRGbuPVUXS2RHXlHbc/0ln9szK/IXxy2dGngl hX1K66oQ4WO7NXyGLTdHJ5cMMAZUpN8pTDR6PtAxU6eF6n7G/HhLPESsur6Wb2ebLpvx 0PtybSvY+X8DkEiJmSiYZufqB9iY69VOTchtTIsVqeoTw5cSrPEJYqhjoXNeBNJNzioJ Wr7ac5KNuAZqt6FO9rggaFPk0DsIuyNiYEvvdPOxcA1nD2t0g7aIb30JnlokB70tJ2XJ 2QrA== X-Received: by 10.221.47.9 with SMTP id uq9mr2713973vcb.48.1408030796433; Thu, 14 Aug 2014 08:39:56 -0700 (PDT) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.220.30.70 with HTTP; Thu, 14 Aug 2014 08:39:16 -0700 (PDT) In-Reply-To: <53ECAECA.50900@gmail.com> References: <5DCAA9AE-CC08-48BA-A0D4-78818BD5D656@gmail.com> <53EC8D31.10807@gmail.com> <53ECAECA.50900@gmail.com> Date: Thu, 14 Aug 2014 17:39:16 +0200 X-Google-Sender-Auth: JcEj1xmiIMJz8CCK7lN5g8jLyc4 Message-ID: To: Rowan Collins Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Evaluation of constructor arguments if there's no constructor From: jpauli@php.net (Julien Pauli) On Thu, Aug 14, 2014 at 2:42 PM, Rowan Collins wrote: > Julien Pauli wrote (on 14/08/2014): >> >> It may be possible to interpret the argument, but I think it will need >> >> new OPCodes, like ZEND_NEW_WITH_CTOR and ZEND_NEW_WITHOUT_CTOR , and a >> compiler patch to support those. >> This may be thought for PHP7, and I think will benefit from the >> ast-compiler RFC if its voted. > > > Yeah, to clarify, I was definitely thinking in terms of PHP7, where lots is > already being done for consistency and parser changes. > > It may be naive of me, but would it be possible to simply add an implicit > constructor with an empty argument list and body to any class which doesn't > have one? This would disable the actual executor optimization. We need to rethink this problem for PHP7's executor. Julien.Pauli