public static function output($path, $length = 102400, $delay = 0)
    {
        if (is_readable($path) === false) {
            return false;
        }

        $buffer = ob_get_level() !== 0;

        $handle = fopen($path, 'rb');

        $length = is_int($length) && $length > 0 ? $length : 102400;

        while (false === feof($handle)) {
            echo fread($handle, $length);

            if ($delay > 0) {
                usleep($delay);
            }

            if ($buffer) {
                ob_flush();
            }

            flush();
        }
    }