---
title: "What are magic methods?"  
description: "What are magic methods?"  
author: "Manoj Bhatt"  
published: 2016-09-26  
updated: 2020-09-20  
canonical: https://www.mindstick.com/interview/23070/what-are-magic-methods  
category: "php"  
tags: ["php"]  
reading_time: 1 minute  

---

# What are magic methods?

The magic methods are special names s**tarting 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.

## Answers

### Answer by Manoj Bhatt

The magic methods are special names s**tarting 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.


---

Original Source: https://www.mindstick.com/interview/23070/what-are-magic-methods

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
