session destroy problem

my code is

  • $this->session->set('aaa', 'aaa');
  • $this->session->destroy();
  • $logger = new File(WEB_PATH."/../apps/logs/test.log");
  • $logger->error((int)$this->session->has('aaa'));
  • $logger->close();

the result is 1. why?



18.6k

Do var_dump($this->session), so you can see what's happening inside.



3.7k

The "_started" property change to falseļ¼ŸSo I can't use $this->session->has to confirm the session when I use forward after destroy session ?

Do var_dump($this->session), so you can see what's happening inside.



18.6k

Do var_dump($this->session->get("aaa")).



3.7k

After destroy, the value is "aaa", I think the destroy method doesn't do the real destroy, It still can be read untill the request is done, but this is illogical.

Do var_dump($this->session->get("aaa")).



18.6k

@phalcon will explain us better (I'm also curious).