public static function isTokenValid($token, $expire)
    {
        if (empty($token) || empty($expire)) {
            return false;
        }
        $parts = explode('_', $token);
        $timestamp = (int)end($parts);
        return $timestamp + (int)$expire >= time();
    }
public static function isTokenValid($token, $expire)
    {
        if (empty($token) || empty($expire)) {
            return false;
        }
        $parts = explode('_', $token);
        $timestamp = (int)end($parts);
        return $timestamp + (int)$expire >= time();
    }
public static function isTokenValid ( $ token , $ expire ) { if ( empty ( $ token ) || empty ( $ expire ) ) { return false ; } $ parts = explode ( '_' , $ token ) ; $ timestamp = ( int ) end ( $ parts ) ; return $ timestamp + ( int ) $ expire >= time ( ) ; }
Finds out if given token type is valid.
@param string $token activation token
@param int $expire expire time
@return bool
Finds out if given token type is valid .