Explain scope levels in PHP.

Jignesh
Written by Jignesh

Posted On: Jan 09, 2019

 

    1 Answer Written

  •  Jignesh
    Posted by manoj

    There are 3 different levels of Scopes are available in PHP. They are.

    • Public: Public scopes allow you to access all data and functions of a Class.
    • Private: Private scopes don't allow you to access the private data and functions of a Class.
    • Protected: Protected scopes only allows its derived class to access the Protected data and functions of a Class.

Please Login or Register to leave a response.

Related Questions

PHP Interview Questions

What is mvc in PHP?

MVC stands for Model View Controller. It is an application design pattern for software development that separates the application data and business logic (model) from the presentation (view)....