What is magic function in php?



What is magic function in php?..

Answer / Raviendra Maurya

In PHP, magic functions are special functions that start and end with double underscores (__). They allow you to override or customize the behavior of various operations like object construction, method calls, property access, etc. Examples include __construct(), __destruct(), __toString(), etc.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

What is variable function php?

1 Answers  


Php program to generate fibonacci series?

1 Answers  


How can I rotate an image?

1 Answers   Rushmore Consultancy,


Why delimiter is used in mysql?

1 Answers  


What is PHP's configuration file called?

1 Answers  


What are escaping characters? Explain with an example?

1 Answers  


Why is php used for web development?

1 Answers  


What is design pattern? Explain all including singleton pattern?

1 Answers  


What's the best method for sanitizing user input with php?

1 Answers  


Tell me can the value of a constant change during the script's execution?

1 Answers  


Explain php explode() function.

1 Answers  


What is putenv?

1 Answers  


Categories