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 is array filter in php?

0 Answers  


Whether php supports microsoft sql server?

0 Answers  


What is the best practice for running mysql queries in php? Consider the risk of sql injection.

0 Answers  


How is session data stored?

0 Answers  


Differentiate between php5 and php7?

0 Answers  


What is the use of @ in php?

0 Answers  


How many ways to include variables in double-quoted strings in php?

0 Answers  


what is the url rewriting?how to rewrite the url? give any example

1 Answers  


How is it possible to propagate a session id?

0 Answers  


What is super () python?

0 Answers  


What is a php array?

0 Answers  


Tips to optimize the php script..... Suggestion for exception handling in php...

1 Answers  


Categories