WHAT ARE MAGIC METHODS?

Manoj Bhatt

Total Post:6

Points:30
Posted by  Manoj Bhatt
PHP 
PHP
 291  View(s)
Ratings:
Rate this:
  1. Manoj Bhatt

    Post:6

    Points:30
    What are magic methods?

    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.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!