Hi Dmitry, > -----Original Message----- > From: Dmitry Stogov [mailto:[email protected]] > Sent: Wednesday, January 11, 2017 1:08 PM > To: PHP internals list <[email protected]>; Bob Weinand > <[email protected]>; Joe Watkins <[email protected]> > Cc: Zeev Suraski <[email protected]>; Anatol Belski ([email protected]) <[email protected]>; > Nikita Popov <[email protected]>; Xinchen Hui <[email protected]> > Subject: [PHP-DEV] Change in type-hint representation > > Hi, > > > I propose to introduce a unified type representation (zend_type). > > Now it's going to be used for typing of arguments and return values. > > Later we should use it for properties and other things. > > > https://gist.github.com/dstogov/1b25079856afccf0d69f77d499cb0ab1 > > > The main changes are in zend_types.h and zend_compile.h, the rest is just an > adoption for new type representation. > > I don't think we need RFC, because this is just an internal change that doesn't > change behavior. > > > I got the idea working on typed properties together with Bob and Joe. > > https://github.com/php/php- > src/compare/master...bwoebi:typed_ref_properties > > I think it would be better to introduce zend_type and then continue work on > typed properties. > I just did a test compilation and everything looks good.
There's one place in ext/com_dotnet/com_handlers.c:305 that would require an adaptation. In this regard a question - would possibly a universal macro make sense, to change the "null allowed" mask ? Also, a macro to change the type, with/without changing the null allowed mask. Just as an API extension to ease the consumer code. I mean, clear, it'd be doable with just a bit more effort, but an API could be handier also for the future compatibility, should the implementation change. For the rest IMO - very elegant approach giving base to facilitate arbitrary types. I also think RFC were a waste of time. Thanks everyone involved! Regards Anatol -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
