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 Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.