Re: [RFC][DISCUSSION] Strong Typing Syntax

From: Date: Fri, 05 Jan 2018 10:35:34 +0000
Subject: Re: [RFC][DISCUSSION] Strong Typing Syntax
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-101542@lists.php.net to get a copy of this message
On 5 January 2018 at 02:01, Michael Morris <tendoaki@gmail.com> wrote: > > what if the underlying zval wasn’t a zval but a separate > class specific to the data type but implementing the same interface as > zval? I believe the only sensible answer to that is 'mu', as that question is based on misunderstanding. The internals of the PHP engine is C, and zvals are structs not classes, and so there is no interface. In userland classes are also zvals. http://www.phpinternalsbook.com/php7/internal_types/zvals/basic_structure.html Also, I think people who try to guess at how to make changes to the engine, are doing a small disservice to people who have already tried to implement this. The current contributors are a bunch of clever people, and if there was an obvious way to implement it, they would have implemented it already. It's not a case that there is going to be an easy solution that has been overlooked, that someone cleverer is going to be able to guess at. cheers Dan Ack

« previous php.internals (#101542) next »