sorenchr Posted October 24, 2009 Share Posted October 24, 2009 Is it solely to protect the data within that class from being overridden, or is there a security aspect to it as well? Best regards sorenchr Link to comment https://forums.phpfreaks.com/topic/178819-why-do-we-use-visibility-in-classes/ Share on other sites More sharing options...
Daniel0 Posted October 24, 2009 Share Posted October 24, 2009 Is it solely to protect the data within that class from being overridden Yes, it's called encapsulation. Link to comment https://forums.phpfreaks.com/topic/178819-why-do-we-use-visibility-in-classes/#findComment-943387 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.