Hi Guest

MobileUser

1 HomePage 1 Jobs 1 WalkIn 1Articles  

Cat Exam

 :) Latest Topic
AJAX
VB.NET
SQL Query
UDDI
CLASS
JavaScript Questions
SharePoint Interview
SilverLight
WCF
general knowledge
 ASP.NET
 :) Hot Jobs
 
 :) Latest Articles


  

 
DogFood


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

Home >> 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



 
 Input Your Comments Or suggestions(If Any)
 Name
 Email(optional)
 Comments


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






 
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |