The magic methods are special namesstarting 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.
Liked By
Write Answer
What are magic methods?
Join MindStick Community
You have need login or register for voting of answers or question.
Manoj Bhatt
26-Sep-2016The 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.