public function isStarted()
{
if (function_exists('session_status')) {
return session_status() === PHP_SESSION_ACTIVE;
}
return isset($_SESSION) && session_id();
}
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); }