crackyourinterview.com


To improves our performance please Like Share Subscribe(Will boost us)

What are Magic methods in PHP and how to use them?
Question Posted on 23 May 2022Home >> PHP >> PHP Questions >> What are Magic methods in PHP and how to use them?

What are Magic methods in PHP and how to use them?
In PHP Magic methods are the memeber function which are available to all the intsances available in class. And Magic methods are always start with "_". And for example we use _construct() method which is a magic methods. And one important things is that all Magic methods need to be declared as public. And when we use magic methods then we should define it within the class or in program scope. Below are the list of 12 different magic methods used in PHP5:-
(1)__construct()
(2)__destruct()
(3)__set()
(4)__get()
(5)__call()
(6)__toString()
(7)__sleep()
(8)__wakeup()
(9)__isset()
(10)__unset()
(11)__autoload()
(12)__clone()
0
0



.


Most Visited Questions:-

Deep Learning Questions Answers
Below are the different Deep Leaning Questions and answer a More...

Continuous Integration Questions Answers
Below are the 20 odd questions for CI or Continuous Integra More...

Derived relationships in Association Rule Mining are represented in the form of __________.
Derived relationships in Association Rule Mining are repres More...

What is Gulpjs and some multiple choice questions on Gulp
Gulpjs is an open source whihc helps in building Javascript More...

Microservices Architecture Questions Answers
Below are the different questions on Microservices Architec More...




Other Important Questions

difference between echo and print

method to past value from one page to another in php

differenc between mysql_connect and mysql_pconnect

What is htaccess file

Code to combine or concatenate two variables in php






@2014-2022 Crackyourinterview (All rights reserved)
Privacy Policy - Disclaimer - Sitemap