TeamSpeak3/Helper/Uri.php
public function checkPass($password = null)
    {
        if ($password === null) {
            $password = $this->pass;
        }

        if (strlen($password) == 0) {
            return true;
        }

        $pattern = "/^(" . $this->regex["alphanum"] . "|" . $this->regex["mark"] . "|" . $this->regex["escaped"] . "|[;:&=+$,])+$/";
        $status = @preg_match($pattern, $password);

        if ($status === false) {
            throw new Ts3Exception("URI password validation failed");
        }

        return ($status == 1);
    }
public function checkPass($password = null)
    {
        if ($password === null) {
            $password = $this->pass;
        }

        if (strlen($password) == 0) {
            return true;
        }

        $pattern = "/^(" . $this->regex["alphanum"] . "|" . $this->regex["mark"] . "|" . $this->regex["escaped"] . "|[;:&=+$,])+$/";
        $status = @preg_match($pattern, $password);

        if ($status === false) {
            throw new Ts3Exception("URI password validation failed");
        }

        return ($status == 1);
    }
public function checkPass ( $ password = null ) { if ( $ password === null ) { $ password = $ this -> pass ; } if ( strlen ( $ password ) == 0 ) { return true ; } $ pattern = "/^(" . $ this -> regex [ "alphanum" ] . "|" . $ this -> regex [ "mark" ] . "|" . $ this -> regex [ "escaped" ] . "|[;:&=+$,])+$/" ; $ status = @ preg_match ( $ pattern , $ password ) ; if ( $ status === false ) { throw new Ts3Exception ( "URI password validation failed" ) ; } return ( $ status == 1 ) ; }
Returns TRUE if the password is valid.

@param  string $password
@throws Ts3Exception
@return boolean
Returns TRUE if the password is valid .