Skip to content

Instantly share code, notes, and snippets.

@mcsee
Last active August 22, 2023 02:11
Show Gist options
  • Save mcsee/5f0b4685e3af22e2a0a82f9f642c5c79 to your computer and use it in GitHub Desktop.
Save mcsee/5f0b4685e3af22e2a0a82f9f642c5c79 to your computer and use it in GitHub Desktop.
<?
class God {
private static $instance = null;
private function __construct() { }
public static function getInstance() {
if (null === self::$instance) {
self::$instance = new self();
}
return self::$instance;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment