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
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 |
What difference between require() and require_once()?
how to run PHP in command line?
8 Answers InfoShore, Ramp Green, Xtreeme,
How to find a specific value in an array?
What is api example?
How to generate pdf file in php?
List out the predefined classes in PHP?
What is the difference between include and require?
What is php session id?
what is Opern source?
can anyone tel me about the Expression engine Note:Its a CMS in Php
What is strcmp () in php?
What are the features and advantages of object-oriented programming in php?