cookies.php
public function restartSession($date = false)
    {
        $surviving_cookies = array();
        for ($i = 0; $i < count($this->cookies); $i++) {
            if (! $this->cookies[$i]->getValue()) {
                continue;
            }
            if (! $this->cookies[$i]->getExpiry()) {
                continue;
            }
            if ($date && $this->cookies[$i]->isExpired($date)) {
                continue;
            }
            $surviving_cookies[] = $this->cookies[$i];
        }
        $this->cookies = $surviving_cookies;
    }
public function restartSession($date = false)
    {
        $surviving_cookies = array();
        for ($i = 0; $i < count($this->cookies); $i++) {
            if (! $this->cookies[$i]->getValue()) {
                continue;
            }
            if (! $this->cookies[$i]->getExpiry()) {
                continue;
            }
            if ($date && $this->cookies[$i]->isExpired($date)) {
                continue;
            }
            $surviving_cookies[] = $this->cookies[$i];
        }
        $this->cookies = $surviving_cookies;
    }
public function restartSession ( $ date = false ) { $ surviving_cookies = array ( ) ; for ( $ i = 0 ; $ i < count ( $ this -> cookies ) ; $ i ++ ) { if ( ! $ this -> cookies [ $ i ] -> getValue ( ) ) { continue ; } if ( ! $ this -> cookies [ $ i ] -> getExpiry ( ) ) { continue ; } if ( $ date && $ this -> cookies [ $ i ] -> isExpired ( $ date ) ) { continue ; } $ surviving_cookies [ ] = $ this -> cookies [ $ i ] ; } $ this -> cookies = $ surviving_cookies ; }
Removes expired and temporary cookies as if the browser was closed and re-opened.

@param string/integer $date Time to test expiry against.
Removes expired and temporary cookies as if the browser was closed and re - opened .