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 are php magic methods?
What is global variable php?
What is the main difference between require() and include()?
Explain soundex() and metaphone().
What is overriding in php?
What is the difference between mysqli_fetch_object() and mysqli_fetch_array()?
Suppose your Zend engine supports the mode <? ?> Then how can u configure your PHP Zend engine to support <?PHP ?> mode ?
What do you mean by core php?
What is php and sql?
What is binary safe string?
How to remove the new line character from the end of a text line?
What is mvc in php?