framework/console/controllers/AssetController.php
private function findRealPath($path)
    {
        $path = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $path);
        $pathParts = explode(DIRECTORY_SEPARATOR, $path);

        $realPathParts = [];
        foreach ($pathParts as $pathPart) {
            if ($pathPart === '..') {
                array_pop($realPathParts);
            } else {
                $realPathParts[] = $pathPart;
            }
        }

        return implode(DIRECTORY_SEPARATOR, $realPathParts);
    }
private function findRealPath($path)
    {
        $path = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $path);
        $pathParts = explode(DIRECTORY_SEPARATOR, $path);

        $realPathParts = [];
        foreach ($pathParts as $pathPart) {
            if ($pathPart === '..') {
                array_pop($realPathParts);
            } else {
                $realPathParts[] = $pathPart;
            }
        }

        return implode(DIRECTORY_SEPARATOR, $realPathParts);
    }
Returns canonicalized absolute pathname.
Unlike regular `realpath()` this method does not expand symlinks and does not check path existence.
@param string $path raw path
@return string canonicalized absolute pathname