diff --git a/Creational/Singleton/Singleton.php b/Creational/Singleton/Singleton.php index ebad0a6..d4ea3a2 100644 --- a/Creational/Singleton/Singleton.php +++ b/Creational/Singleton/Singleton.php @@ -28,6 +28,13 @@ final class Singleton { } + /** + * prevent the instance from being cloned (which would create a second instance of it) + */ + private function __clone() + { + } + /** * prevent from being unserialized (which would create a second instance of it) */