original_string: private function requestsMatch($vary, $env1, $env2)
      {
          if (empty($vary)) {
              return true;
          }
  
          foreach (preg_split('/[\s,]+/', $vary) as $header) {
              $key = str_replace('_', '-', strtolower($header));
              $v1 = isset($env1[$key]) ? $env1[$key] : null;
              $v2 = isset($env2[$key]) ? $env2[$key] : null;
              if ($v1 !== $v2) {
                  return false;
              }
          }
  
          return true;
      }
code: private function requestsMatch($vary, $env1, $env2)
      {
          if (empty($vary)) {
              return true;
          }
  
          foreach (preg_split('/[\s,]+/', $vary) as $header) {
              $key = str_replace('_', '-', strtolower($header));
              $v1 = isset($env1[$key]) ? $env1[$key] : null;
              $v2 = isset($env2[$key]) ? $env2[$key] : null;
              if ($v1 !== $v2) {
                  return false;
              }
          }
  
          return true;
      }
code_tokens: private function requestsMatch ( $ vary , $ env1 , $ env2 ) { if ( empty ( $ vary ) ) { return true ; } foreach ( preg_split ( '/[\s,]+/' , $ vary ) as $ header ) { $ key = str_replace ( '_' , '-' , strtolower ( $ header ) ) ; $ v1 = isset ( $ env1 [ $ key ] ) ? $ env1 [ $ key ] : null ; $ v2 = isset ( $ env2 [ $ key ] ) ? $ env2 [ $ key ] : null ; if ( $ v1 !== $ v2 ) { return false ; } } return true ; }
docstring: Determines whether two Request HTTP header sets are non-varying based on
  the vary response header value provided.
  
  @param string $vary A Response vary header
  @param array  $env1 A Request HTTP header array
  @param array  $env2 A Request HTTP header array
  
  @return bool true if the two environments match, false otherwise
docstring_tokens: Determines whether two Request HTTP header sets are non - varying based on the vary response header value provided .