original_string: public static function splitPath(string $path, bool $safe = null): array
      {
          if ($path === '') {
              return [];
          }
  
          $safe = ($safe === null ? self::$safeSeparationMode : $safe);
  
          if ($safe) {
              $segments = preg_split('~\\\\' . self::$separator . '(*SKIP)(*F)|\.~s', $path, -1, PREG_SPLIT_NO_EMPTY);
  
              if ($segments === false) {
                  // actually this code can't be covered with tests, because i don't know how to make preg_split()
                  // return a FALSE value but handling it in case some one will %)
                  trigger_error('Path splitting failed, received path: ' . $path);
  
                  $segments = [];
              }
  
              foreach ($segments as &$segment) {
                  $segment = stripslashes($segment);
              }
  
              return $segments;
          }
  
          return explode(self::$separator, $path);
      }
code: public static function splitPath(string $path, bool $safe = null): array
      {
          if ($path === '') {
              return [];
          }
  
          $safe = ($safe === null ? self::$safeSeparationMode : $safe);
  
          if ($safe) {
              $segments = preg_split('~\\\\' . self::$separator . '(*SKIP)(*F)|\.~s', $path, -1, PREG_SPLIT_NO_EMPTY);
  
              if ($segments === false) {
                  // actually this code can't be covered with tests, because i don't know how to make preg_split()
                  // return a FALSE value but handling it in case some one will %)
                  trigger_error('Path splitting failed, received path: ' . $path);
  
                  $segments = [];
              }
  
              foreach ($segments as &$segment) {
                  $segment = stripslashes($segment);
              }
  
              return $segments;
          }
  
          return explode(self::$separator, $path);
      }
code_tokens: public static function splitPath ( string $ path , bool $ safe = null ) : array { if ( $ path === '' ) { return [ ] ; } $ safe = ( $ safe === null ? self :: $ safeSeparationMode : $ safe ) ; if ( $ safe ) { $ segments = preg_split ( '~\\\\' . self :: $ separator . '(*SKIP)(*F)|\.~s' , $ path , - 1 , PREG_SPLIT_NO_EMPTY ) ; if ( $ segments === false ) { // actually this code can't be covered with tests, because i don't know how to make preg_split() // return a FALSE value but handling it in case some one will %) trigger_error ( 'Path splitting failed, received path: ' . $ path ) ; $ segments = [ ] ; } foreach ( $ segments as & $ segment ) { $ segment = stripslashes ( $ segment ) ; } return $ segments ; } return explode ( self :: $ separator , $ path ) ; }
docstring: Split given string to it's segments according to dot notation.
  Empty segments will be ignored.
  Supports escaping.
  
  @param string $path
  @param bool $safe
  
  @return array
docstring_tokens: Split given string to it s segments according to dot notation . Empty segments will be ignored . Supports escaping .