original_string: public static function check_edge_version($version = null) {
          $useragent = self::get_user_agent_string();
  
          if ($useragent === false) {
              // No User Agent found.
              return false;
          }
  
          if (strpos($useragent, 'Edge/') === false) {
              // Edge was not found in the UA - this is not Edge.
              return false;
          }
  
          if (empty($version)) {
              // No version to check.
              return true;
          }
  
          // Find the version.
          // Edge versions are always in the format:
          //      Edge/<version>.<OS build number>
          preg_match('%Edge/([\d]+)\.(.*)$%', $useragent, $matches);
  
          // Just to be safe, round the version being tested.
          // Edge only uses integer versions - the second component is the OS build number.
          $version = round($version);
  
          // Check whether the version specified is >= the version found.
          return version_compare($matches[1], $version, '>=');
      }
code: public static function check_edge_version($version = null) {
          $useragent = self::get_user_agent_string();
  
          if ($useragent === false) {
              // No User Agent found.
              return false;
          }
  
          if (strpos($useragent, 'Edge/') === false) {
              // Edge was not found in the UA - this is not Edge.
              return false;
          }
  
          if (empty($version)) {
              // No version to check.
              return true;
          }
  
          // Find the version.
          // Edge versions are always in the format:
          //      Edge/<version>.<OS build number>
          preg_match('%Edge/([\d]+)\.(.*)$%', $useragent, $matches);
  
          // Just to be safe, round the version being tested.
          // Edge only uses integer versions - the second component is the OS build number.
          $version = round($version);
  
          // Check whether the version specified is >= the version found.
          return version_compare($matches[1], $version, '>=');
      }
code_tokens: public static function check_edge_version ( $ version = null ) { $ useragent = self :: get_user_agent_string ( ) ; if ( $ useragent === false ) { // No User Agent found. return false ; } if ( strpos ( $ useragent , 'Edge/' ) === false ) { // Edge was not found in the UA - this is not Edge. return false ; } if ( empty ( $ version ) ) { // No version to check. return true ; } // Find the version. // Edge versions are always in the format: //      Edge/<version>.<OS build number> preg_match ( '%Edge/([\d]+)\.(.*)$%' , $ useragent , $ matches ) ; // Just to be safe, round the version being tested. // Edge only uses integer versions - the second component is the OS build number. $ version = round ( $ version ) ; // Check whether the version specified is >= the version found. return version_compare ( $ matches [ 1 ] , $ version , '>=' ) ; }
docstring: Check the User Agent for the version of Edge.
  
  @param string|int $version A version to check for, returns true if its equal to or greater than that specified.
  @return bool
docstring_tokens: Check the User Agent for the version of Edge .