Home > DeveloperSection > Interviews > What are magic methods?

Posted on    September-26-2016 1:39 AM

 PHP PHP 
Ratings:
 1 Answer(s)
  86  View(s)
Rate this:

Manoj Bhatt
Manoj Bhatt

Total Post:6

Points:30
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