Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


class Database
{
public static $_instance;

public static function getInstance()
{
if(!isset(self::$_instance))
self::$_instance = new Database(DB_SERVER, DB_USER,
DB_PASS, DB_NAME);
print_r(self::$_instance);
return self::$_instance;
}
}
can any one explain "self::$_instance = new
Database(DB_SERVER, DB_USER, DB_PASS, DB_NAME);" this line



class Database { public static $_instance; public static function getInstance() { if(!is..

Answer / guest

self::$_instance = new
Database(DB_SERVER, DB_USER, DB_PASS, DB_NAME);

It represents object creation of the class 'Database'.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

Tell me how do I escape data before storing it into the database?

0 Answers  


Is php a low level language?

0 Answers  


What are major variables in research?

0 Answers  


What is polymorphism?

0 Answers  


What is the difference between unlink and unset ?

3 Answers  


Do you know how to delete a file from the system?

0 Answers  


What is the use of the function 'imagetypes()'?

0 Answers  


What is mod_php?

0 Answers  


which institute provide better PHP trainning in delhi? please tell me how much salary can freshers get ? thanku

5 Answers  


Why is overriding runtime?

0 Answers  


Explain about PHP cookies?

0 Answers  


What is the difference between PHP,ASP and JSP?

3 Answers   T3 Softwares,


Categories