phpzend-frameworksessionzend-sessionzend-session-namespace

UNSET not working for Zend Session


I'm working with Zend Session but I have a problem. If I instanciate a Zend_Session_Namespace('a') and unset it, I continue getting the storage:

$storage = new Zend_Session_Namespace('a');
unset($storage);
$storage = new Zend_Session_Namespace('a');
echo $storage->id;

And get the data I stored before.

Any idea???


Solution

  • Try this

    $storage->unsetAll();
    

    Or this for a single value:

    unset($storage->id);