Re: Evaluation of constructor arguments if there's no constructor

From: Date: Thu, 14 Aug 2014 15:39:16 +0000
Subject: Re: Evaluation of constructor arguments if there's no constructor
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-76519@lists.php.net to get a copy of this message
On Thu, Aug 14, 2014 at 2:42 PM, Rowan Collins <rowan.collins@gmail.com> 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

« previous php.internals (#76519) next »