src/Request.php
protected static function splitPathExt($path) {
        if (substr($path, -1) !== '/' && ($pos = strrpos($path, '.')) !== false) {
            $ext = substr($path, $pos);
            $path = substr($path, 0, $pos);
            return [$path, $ext];
        } else {
            return [$path, ''];
        }
    }
protected static function splitPathExt($path) {
        if (substr($path, -1) !== '/' && ($pos = strrpos($path, '.')) !== false) {
            $ext = substr($path, $pos);
            $path = substr($path, 0, $pos);
            return [$path, $ext];
        } else {
            return [$path, ''];
        }
    }
Split the file extension off a path.

@param string $path The path to split.
@return array Returns an array in the form `['path', 'ext']`.