$auth = Zend_Auth::getInstance(); $auth->clearIdentity();
$authService = $serviceManager->get('Zend\Authentication\AuthenticationService'); $authService->clearIdentity();In example 1, we retrieve the `Zend_Auth` instance using the `getInstance()` method, and then call the `clearIdentity()` method to clear the identity information. In example 2, we use the `AuthenticationService` from the `Zend\Authentication` namespace to retrieve `$authService` from the service manager. We can then call the `clearIdentity()` method on this object to clear the identity information. Package Library: The `Zend_Auth` class is part of the `zendframework/zend-authentication` package/library in both Zend Framework 1 and 2+.