What is the difference between public, protected and private?
PHP has three access modifiers such as public, private, and protected.
publicscope of this variable or function is available from anywhere, other classes, and instances of the object.
privatescope of this variable or function is available in its class only.
protectedscope of this variable or function is available in all classes that extend the current class including the parent class.
Note: One of the most tricky oops interview questions in php, you need to answer this question with utmost clarity. Maybe explaining it with a short example or even a dry run would help you get that dream job.