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

What difference between require() and require_once()?

0 Answers  


how to run PHP in command line?

8 Answers   InfoShore, Ramp Green, Xtreeme,


How to find a specific value in an array?

0 Answers  


What is api example?

0 Answers  


How to generate pdf file in php?

1 Answers  


List out the predefined classes in PHP?

11 Answers  


What is the difference between include and require?

0 Answers  


What is php session id?

0 Answers  


what is Opern source?

3 Answers  


can anyone tel me about the Expression engine Note:Its a CMS in Php

2 Answers  


What is strcmp () in php?

0 Answers  


What are the features and advantages of object-oriented programming in php?

0 Answers  


Categories