Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Repeat a string
<?php str_repeat(string $string, int $times): string
<?php     protected function echoLine(string $line, int $depth, string $indentPad)

    {

        if (-1 !== $depth) {

            fwrite($this->outputStream, str_repeat($indentPad, $depth).$line."\n");

        }

    }
<?php         $dumper = new CliDumper(function ($line, $depth) use (&$out) {

            if ($depth >= 0) {

                $out .= str_repeat('  ', $depth).$line."\n";

            }

        });

        $dumper->setColors(false);
<?php         $out = '';

        $dumper = new CliDumper(function ($line, $depth) use (&$out) {

            if ($depth >= 0) {

                $out .= str_repeat('  ', $depth).$line."\n";

            }

        }, null, $flags);

        $dumper->setColors(true);