> ------------------------------------------------------------------------
> *Extra shorthand declaration*
>
> Allow extra short declaration of an accessor:
>
> class TimePeriod {
> public DateTime $date;
> }
>
> /* Would be equivalent to this */
>
> class TimePeriod {
> public $date {
> get() { return $this->date; }
> set(DateTime $value) { $this->date = $value;}
> }
> }
This is lovely. Full support from me.
I just have one question: can we drop `public`? Default visibility in
methods is public, so maybe we can drop it when using type-hinted
properties? Just an idea; no worries if it needs to stay.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php