Spanner/src/Session/Session.php
public function exists(array $options = [])
    {
        try {
            $this->connection->getSession($options + [
                'name' => $this->name(),
                'database' => $this->database
            ]);

            return true;
        } catch (NotFoundException $e) {
            return false;
        }
    }
public function exists(array $options = [])
    {
        try {
            $this->connection->getSession($options + [
                'name' => $this->name(),
                'database' => $this->database
            ]);

            return true;
        } catch (NotFoundException $e) {
            return false;
        }
    }
public function exists ( array $ options = [ ] ) { try { $ this -> connection -> getSession ( $ options + [ 'name' => $ this -> name ( ) , 'database' => $ this -> database ] ) ; return true ; } catch ( NotFoundException $ e ) { return false ; } }
Check if the session exists.

@param array $options [optional] Configuration options.
@return bool
Check if the session exists .