On 1/17/2017 9:48 PM, Nikita Popov wrote: > Without putting a lot of though into this, the restriction sounds > reasonable. > > However, it is not immediately clear to me how this can be implemented > without adding a disproportionate amount of overhead for something which I > would consider a rather minor feature. If an object only had a single > constructor this would be a simple flag, but if you want to allow one call > per each constructor in the hierarchy (i.e. you can call the constructor > and each parent constructor once), this information needs to be stored > somehow. The obvious way would be a hashset containing the constructors (or > CEs) that have been called on the object, but I don't think this would be > acceptable. > > Regards, > Nikita >
Hey Nikic! Thanks for skimming over it. I also though about implementation already. My initial though was -- especially to keep it simple -- to simply delete the method from the object's table. Not sure if this is possible or just introduced more problems than it solves. Also considering that we think reflection should continue to allow calling it multiple times, though this is obviously still debatable. -- Richard "Fleshgrinder" Fussenegger -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php