original_string: public static function getCurrentScriptPath()
      {
          $queryString = self::getCurrentScriptName();
  
          //add a fake letter case /test/test2/ returns /test which is not expected
          $urlDir = dirname($queryString . 'x');
          $urlDir = str_replace('\\', '/', $urlDir);
          // if we are in a subpath we add a trailing slash
          if (strlen($urlDir) > 1) {
              $urlDir .= '/';
          }
          return $urlDir;
      }
code: public static function getCurrentScriptPath()
      {
          $queryString = self::getCurrentScriptName();
  
          //add a fake letter case /test/test2/ returns /test which is not expected
          $urlDir = dirname($queryString . 'x');
          $urlDir = str_replace('\\', '/', $urlDir);
          // if we are in a subpath we add a trailing slash
          if (strlen($urlDir) > 1) {
              $urlDir .= '/';
          }
          return $urlDir;
      }
code_tokens: public static function getCurrentScriptPath ( ) { $ queryString = self :: getCurrentScriptName ( ) ; //add a fake letter case /test/test2/ returns /test which is not expected $ urlDir = dirname ( $ queryString . 'x' ) ; $ urlDir = str_replace ( '\\' , '/' , $ urlDir ) ; // if we are in a subpath we add a trailing slash if ( strlen ( $ urlDir ) > 1 ) { $ urlDir .= '/' ; } return $ urlDir ; }
docstring: Returns the path to the script being executed. The script file name is not included.
  
  @return string eg, `"/dir1/dir2/"` if the current URL is
  `"http://example.org/dir1/dir2/index.php?param1=value1&param2=value2"`
  @api
docstring_tokens: Returns the path to the script being executed . The script file name is not included .