This is an old revision of this page, as edited by Whpq(talk | contribs) at 17:50, 8 July 2010(propose merge). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.Revision as of 17:50, 8 July 2010 by Whpq(talk | contribs)(propose merge)
The visibility of PHP properties and methods refers to visibility in PHP. It is defined using the keywords "public," "private," and "protected." The default is public, if only var is used; "var" is a synonym for "public." Public declared items can be accessed everywhere. Protected limits access to inherited classes (and to the class that defines the item). Private limits visibility only to the class that defines the item.[1] Objects of the same type have access to each others private and protected members even though they are not the same instances. PHP's member visibility features have sometimes been described as "highly useful."[2] However, they have also sometimes been described as "at best irrelevant and at worst positively harmful."[3]