What is the difference between super () and this ()?



What is the difference between super () and this ()?..

Answer / Panne Lal

In PHP, 'super' does not exist. Instead, you can use 'parent::' to call a method or property of the parent class from within the context of a child class. On the other hand, 'this' also does not exist in PHP directly, but you can use $this to refer to the current object instance inside a class.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

What can I do by cakePHP?

4 Answers  


What is xss and csrf?

1 Answers  


What is the importance of "action" attribute in a html form?

1 Answers  


What is the function to count elements in an array in PHP?

1 Answers  


How to access standard error stream in PHP?

1 Answers  


What is overloading in php?

1 Answers  


what mode to use when creating dirs with mkdir?

1 Answers  


What would occur if a fatal error was thrown in your php program?

1 Answers  


What is php and its features?

1 Answers  


What is filter_var?

1 Answers  


Define urlencode() and urldecode() used in php?

1 Answers  


How can we extract string "pcds.co.in" from a string "https://info@pcds.co.in" using regular expression of php? More on reg can you explain

0 Answers  


Categories