original_string: public static function constantEquals($original, $compare)
      {
          if (!is_string($original) || !is_string($compare)) {
              return false;
          }
          if (function_exists('hash_equals')) {
              return hash_equals($original, $compare);
          }
          $originalLength = mb_strlen($original, '8bit');
          $compareLength = mb_strlen($compare, '8bit');
          if ($originalLength !== $compareLength) {
              return false;
          }
          $result = 0;
          for ($i = 0; $i < $originalLength; $i++) {
              $result |= (ord($original[$i]) ^ ord($compare[$i]));
          }
  
          return $result === 0;
      }
code: public static function constantEquals($original, $compare)
      {
          if (!is_string($original) || !is_string($compare)) {
              return false;
          }
          if (function_exists('hash_equals')) {
              return hash_equals($original, $compare);
          }
          $originalLength = mb_strlen($original, '8bit');
          $compareLength = mb_strlen($compare, '8bit');
          if ($originalLength !== $compareLength) {
              return false;
          }
          $result = 0;
          for ($i = 0; $i < $originalLength; $i++) {
              $result |= (ord($original[$i]) ^ ord($compare[$i]));
          }
  
          return $result === 0;
      }
code_tokens: public static function constantEquals ( $ original , $ compare ) { if ( ! is_string ( $ original ) || ! is_string ( $ compare ) ) { return false ; } if ( function_exists ( 'hash_equals' ) ) { return hash_equals ( $ original , $ compare ) ; } $ originalLength = mb_strlen ( $ original , '8bit' ) ; $ compareLength = mb_strlen ( $ compare , '8bit' ) ; if ( $ originalLength !== $ compareLength ) { return false ; } $ result = 0 ; for ( $ i = 0 ; $ i < $ originalLength ; $ i ++ ) { $ result |= ( ord ( $ original [ $ i ] ) ^ ord ( $ compare [ $ i ] ) ) ; } return $ result === 0 ; }
docstring: A timing attack resistant comparison that prefers native PHP implementations.
  
  @param string $original The original value.
  @param string $compare The comparison value.
  @return bool
  @see https://github.com/resonantcore/php-future/
  @since 3.6.2
docstring_tokens: A timing attack resistant comparison that prefers native PHP implementations .