public static function getInstance() { if (!self::$instance) { self::$instance = new God(); } return self::$instance; }
<?php $god = God::getInstance(); //will not run the constructor because its alrady created $god = God::getInstance();
public function __construct() { if (!God::$instance) { God::$instance = $this; } }