In PHP, which of the following keywords is used to access properties and methods of a parent class from a child class?
- super
- parent
- this
- self
In PHP, the 'parent' keyword is used to access properties and methods of a parent class from a child class. This is essential when you want to override a method in the child class while still using the parent class's method.
Loading...
Related Quiz
- What can happen if a required field is left empty in a PHP form?
- In PHP, you can refer to the current namespace using the ________ keyword.
- The ________ function in PHP is used to check if a particular function exists.
- In PHP OOP, what does the term "inheritance" mean?
- What is the main difference between a session and a cookie in PHP?