original_string: public static function getLocalIP() {
          $s = &$_SERVER;
  
          $ipAddress = $s['REMOTE_ADDR'];
  
          if (array_key_exists('HTTP_X_FORWARDED_FOR', $s)) {
              $temp = explode(',', $s['HTTP_X_FORWARDED_FOR']);
              $ipAddress = array_pop($temp);
          }
  
          $result = $ipAddress == '::1' ? "127.0.0.1" : $ipAddress;
  
          return $result;
      }
code: public static function getLocalIP() {
          $s = &$_SERVER;
  
          $ipAddress = $s['REMOTE_ADDR'];
  
          if (array_key_exists('HTTP_X_FORWARDED_FOR', $s)) {
              $temp = explode(',', $s['HTTP_X_FORWARDED_FOR']);
              $ipAddress = array_pop($temp);
          }
  
          $result = $ipAddress == '::1' ? "127.0.0.1" : $ipAddress;
  
          return $result;
      }
code_tokens: public static function getLocalIP ( ) { $ s = & $ _SERVER ; $ ipAddress = $ s [ 'REMOTE_ADDR' ] ; if ( array_key_exists ( 'HTTP_X_FORWARDED_FOR' , $ s ) ) { $ temp = explode ( ',' , $ s [ 'HTTP_X_FORWARDED_FOR' ] ) ; $ ipAddress = array_pop ( $ temp ) ; } $ result = $ ipAddress == '::1' ? "127.0.0.1" : $ ipAddress ; return $ result ; }
docstring: Get local IP
  @return string
docstring_tokens: Get local IP