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 csrf cookie?

0 Answers  


What is filter_var?

0 Answers  


how can attached a file to a mail and attached a resume to a mail and received in id

0 Answers  


Which functions are used to remove whitespaces from the string?

0 Answers  


What is polymorphism?

0 Answers  


Tell me when a conditional statement is ended with an endif?

0 Answers  


How be the result set of mysql handled in php?

0 Answers  


What are the advantages of stored procedures?

0 Answers  


What is the purpose of php?

0 Answers  


What is global array in php?

0 Answers  


What IS PHP?

3 Answers   Reliance,


how to include external php file in to html page?

8 Answers   Eccentric Infotech,


Categories