Question:

In a PHP class what are the three visibility keywords of a property or method?

Answer:

public, private and protected. The default is public. 
Public -> Any class may instantiate the class and call the method or property. 
Protected -> Only the class itself or inherited (children) classes may call a method or property.
Private -> Only the class itself may call a method or property.

http://php.net/manual/en/language.oop5.visibility.php


Keywords:

© 2017 QuizBucket.org