<?php
class db {
private static $_instance;
private function __construct ()
{
}
public static finction instance()
{
if (is_null(self::$_instance)) {
self::$_instance = new self();
}
return self::$_instance;
}
}
где надо используй
db::instance();
db::instance();