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 Posted / 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 View All Answers
What are the encryption functions in php?
What should we do to be able to export data into an excel file?
What does $_ post mean in php?
Tell me what is the use of "ksort" in php?
Differences between get, post and request methods ?
How to open a file for reading?
What is the meaning of a final class and a final method?
how can i develop forum code? any one pleale help me on this question
What is a php session?
What is polymorphism?
Why is overriding runtime?
How to include variables in double-quoted strings?
What is the difference between associative array and indexed array?
What is difference between rest and http?
How to remove all duplicate values in array in php?