Hello internals,

Based on a few discussions I've had recently, my team and I couldn't think of 
any reason why we shouldn't have properties on interfaces as it is common for 
these to be specified in doc blocks currently. Timing-wise, this lines up well 
with dynamic properties being depreciated. 

I've thrown together a very quick POC, there are many tests and examples of how 
this could look. 

https://github.com/php/php-src/compare/master...Humni:php-src:feature/rfc-interface-properties

Some of the key architectural decisions:
- interfaces can implement the same property (exact type match only)
- interface properties must be public
- interface properties can't be static
- interface properties can be readonly

Open to feedback from everyone on this - keen to get the ball rolling quickly 
on it! 

Kind Regards,
Nick
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to