src/Singleton.php
public static function getInstance() {

        // late-static-bound class name
        $classname = get_called_class();
        if (!isset(self::$instances[$classname])) {
            self::$instances[$classname] = new static;
        }
        return self::$instances[$classname];
    }
public static function getInstance() {

        // late-static-bound class name
        $classname = get_called_class();
        if (!isset(self::$instances[$classname])) {
            self::$instances[$classname] = new static;
        }
        return self::$instances[$classname];
    }
public static function getInstance ( ) { // late-static-bound class name $ classname = get_called_class ( ) ; if ( ! isset ( self :: $ instances [ $ classname ] ) ) { self :: $ instances [ $ classname ] = new static ; } return self :: $ instances [ $ classname ] ; }
return an instance of the called class

@return mixed
return an instance of the called class