original_string: public static function realUrl(string $value)
      {
          list($scheme, $url) = explode('//', $value);
          $reverse = explode('/', $url);
          $arr = [];
          foreach ($reverse as $item) {
              $arr[] = $item;
              if ($item == '..') {
                  array_pop($arr);    // remove 2x from array stack
                  array_pop($arr);
              }
          }
          return $scheme . '//' . implode('/', $arr);
      }
code: public static function realUrl(string $value)
      {
          list($scheme, $url) = explode('//', $value);
          $reverse = explode('/', $url);
          $arr = [];
          foreach ($reverse as $item) {
              $arr[] = $item;
              if ($item == '..') {
                  array_pop($arr);    // remove 2x from array stack
                  array_pop($arr);
              }
          }
          return $scheme . '//' . implode('/', $arr);
      }
code_tokens: public static function realUrl ( string $ value ) { list ( $ scheme , $ url ) = explode ( '//' , $ value ) ; $ reverse = explode ( '/' , $ url ) ; $ arr = [ ] ; foreach ( $ reverse as $ item ) { $ arr [ ] = $ item ; if ( $ item == '..' ) { array_pop ( $ arr ) ; // remove 2x from array stack array_pop ( $ arr ) ; } } return $ scheme . '//' . implode ( '/' , $ arr ) ; }
docstring: Real url.
  
  @param string $value
  @return string
docstring_tokens: Real url .