original_string: public static function is_ajax($is_phery = false)
      {
          switch ($is_phery) {
              case true:
                  return (bool)(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) &&
                      strcasecmp($_SERVER['HTTP_X_REQUESTED_WITH'], 'XMLHttpRequest') === 0 &&
                      strtoupper($_SERVER['REQUEST_METHOD']) === 'POST' &&
                      !empty($_SERVER['HTTP_X_PHERY']));
              case false:
                  return (bool)(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) &&
                      strcasecmp($_SERVER['HTTP_X_REQUESTED_WITH'], 'XMLHttpRequest') === 0);
          }
          return false;
      }
code: public static function is_ajax($is_phery = false)
      {
          switch ($is_phery) {
              case true:
                  return (bool)(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) &&
                      strcasecmp($_SERVER['HTTP_X_REQUESTED_WITH'], 'XMLHttpRequest') === 0 &&
                      strtoupper($_SERVER['REQUEST_METHOD']) === 'POST' &&
                      !empty($_SERVER['HTTP_X_PHERY']));
              case false:
                  return (bool)(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) &&
                      strcasecmp($_SERVER['HTTP_X_REQUESTED_WITH'], 'XMLHttpRequest') === 0);
          }
          return false;
      }
code_tokens: public static function is_ajax ( $ is_phery = false ) { switch ( $ is_phery ) { case true : return ( bool ) ( ! empty ( $ _SERVER [ 'HTTP_X_REQUESTED_WITH' ] ) && strcasecmp ( $ _SERVER [ 'HTTP_X_REQUESTED_WITH' ] , 'XMLHttpRequest' ) === 0 && strtoupper ( $ _SERVER [ 'REQUEST_METHOD' ] ) === 'POST' && ! empty ( $ _SERVER [ 'HTTP_X_PHERY' ] ) ) ; case false : return ( bool ) ( ! empty ( $ _SERVER [ 'HTTP_X_REQUESTED_WITH' ] ) && strcasecmp ( $ _SERVER [ 'HTTP_X_REQUESTED_WITH' ] , 'XMLHttpRequest' ) === 0 ) ; } return false ; }
docstring: Check if the current call is an ajax call
  
  @param bool $is_phery Check if is an ajax call and a phery specific call
  
  @static
  @return bool
docstring_tokens: Check if the current call is an ajax call