On Tue, 15 Nov 2016, at 11:44 PM, Michael Morris wrote: > Note this would simplify one of the use cases of setters - insuring the > class member is of a valid type.
It's already possible to ensure within a setter that the variable is of a specified type, you only need to make the instance variable private and scalar type hint the method arguments within the setter (provided that strict_types is set), I think this would be more likely to lead to code littered with calls to unset rather than to provide much benefit, and as far as I'm aware, there's no real performance benefit that can be gained from this as of yet since the variables will still be a zval internally. -- Daniel Morris dan...@honestempire.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php