Are there any best practices to follow when using Singletons in PHP to ensure consistent behavior across different systems?

When using Singletons in PHP, it is important to ensure consistent behavior across different systems by following best practices such as making the constructor private to prevent instantiation of multiple instances, using a static method to access the Singleton instance, and implementing lazy loading to create the instance only when needed.

class Singleton {
    private static $instance = null;

    private function __construct() {
        // private constructor to prevent instantiation
    }

    public static function getInstance() {
        if (self::$instance === null) {
            self::$instance = new self();
        }
        return self::$instance;
    }
}