Re: how to mark protected properties?
| From: | Michael Wallner | Date: | Mon, 07 Jun 2004 20:43:58 +0000 |
| Subject: | Re: how to mark protected properties? | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-30096@lists.php.net to get a copy of this message | ||
Richard York wrote:
Daniel Convissor wrote:Well, they have not. Private members are not accessible by extending classes, but protected are. Accessing private members is kind of a "bad PHP4 habit".The point of my question is, in the naming of protected members, should there be any prefix character, like we do with "_" for private members?+1 for '_', seems they have the same essence in their functionality.
Even though PHP 5 makes this more intuitive with keywords and real implementation of the intended functionality of protected and private properties and methods I think preceeding them with an underscore makes them easier to spot.What if they get declared public in extending classes? Regards, Michael