Home > DeveloperSection > Interviews > What are magic methods?

Posted on    September-26-2016 1:39 AM

 1 Answer(s)
  255  View(s)
Rate this:

Manoj Bhatt
Manoj Bhatt

Total Post:6

Posted on    September-26-2016 1:39 AM

The magic methods are special names starting with two underscore “__”. These magic methods are executed in response to some events. Some magic methods are  __call(), __construct(),invoke(),__destruct(), __callstatic(),__get(),autoload(),  __set(), __sleep(),__isset(), __unset(),__wakeup(),  __tostring()and __clone(). These methods are defined inside the class and not outside the class. These methods ae not standalone methods.

Don't want to miss updates? Please click the below button!

Follow MindStick