isStarted() public method

Obtain the status of the session.
public isStarted ( ) : boolean
return boolean True if a session is currently started, False otherwise. If PHP 5.4 then we know, if PHP 5.3 then we cannot tell for sure if a session has been closed.
Beispiel #1
0
 public function testIsStartedNoInit()
 {
     $this->_destroySession(session_name());
     $Php = new Php(array('init' => false));
     $result = $Php->isStarted();
     $this->assertFalse($result);
     $Php = new Php();
     $Php->read();
     $result = $Php->isStarted();
     $this->assertTrue($result);
 }