On 09/18/2015 02:29 PM, Rowan Collins wrote:
Jefferson Gonzalez wrote on 18/09/2015 19:25:
I also believe the rfc should include type hinting of enums as has
been mentioned on this discussion. That would make enumerations more
useful and the rfc more complete.
It already mentions that:
> Enums are strongly typed and can be used as parameter or return types.
As I understand it, this actually comes for free the way it's
implemented, because Enums are actually a type of object, and the enum
declaration is effectively a class.
Whoops... just noticed after re-reading the rfc :) thanks!
Then I guess the missing bits are an implementation (most important
part) and a happy medium for those that believe that behind the scenes
(serialization, storage, databases) enumerations should be represented
numerically (for the various reasons discussed).
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php