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 is csrf cookie?
What is filter_var?
how can attached a file to a mail and attached a resume to a mail and received in id
Which functions are used to remove whitespaces from the string?
What is polymorphism?
Tell me when a conditional statement is ended with an endif?
How be the result set of mysql handled in php?
What are the advantages of stored procedures?
What is the purpose of php?
What is global array in php?
What IS PHP?
how to include external php file in to html page?