The problem with that Nikita is that it would need a variable storage location, which would mean a hidden, auto-implemented property. You were dead-set against that from the get go. Keep in mind that property accessors are not properties, real properties will take over the accessor, this could only be done from within the setter of an accessor, but there isn't any way to create an accessor named $Hours which accesses a variable named $Hours.
In any case, your example below could be implemented without automatic creation simply by doing the backing yourself, such as: private $myFoo; public $foo { get() { return $this->myFoo; } protected set($x) { $this->myFoo = $x; } } Again, without another "variable store" automatic properties goes out the door, can't really have one without the other. Shall I hold off on this discussion point before proceeding? > -----Original Message----- > From: Nikita Popov [mailto:nikita....@gmail.com] > Sent: Friday, October 12, 2012 5:48 AM > To: Clint Priest > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 > > On Fri, Oct 12, 2012 at 7:23 AM, Clint Priest <cpri...@zerocue.com> wrote: > > Alright, here is the updated RFC as per discussions for the last few days: > > > > https://wiki.php.net/rfc/propertygetsetsyntax-as-implemented > > > > If you could read it over, make sure I have all of your concerns correctly > > addressed and we can leave this open for the two week > waiting period while I make the final code changes. > > > > -Clint > > I've been thinking a bit about the automatic properties again, and noticed > that I forgot to name one use case: Asymmetric accessor > visibility. Automatic properties may be useful in that context, so that you > can write "public $foo { get; protected set; }" (though they > don't necessarily need to be implemented as properties with auto generated > code, rather just properties with more detailed visibility > handling [a bit related to the stuff Amaury has been saying]). > > Nikita -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php