protected static function renderArrayDump(array $array, int $level, bool $plaintext = false, bool $ansiColors = false): string
    {
        if (is_array($array)) {
            $dump = 'array' . (count($array) ? '(' . count($array) . ')' : '(empty)');
        } elseif ($array instanceof \Countable) {
            $dump = get_class($array) . (count($array) ? '(' . count($array) . ')' : '(empty)');
        } else {
            $dump = get_class($array);
        }
        foreach ($array as $key => $value) {
            $dump .= chr(10) . str_repeat(' ', $level) . self::renderDump($key, 0, $plaintext, $ansiColors) . ' => ';
            $dump .= self::renderDump($value, $level + 1, $plaintext, $ansiColors);
        }

        return $dump;
    }
protected static function renderArrayDump(array $array, int $level, bool $plaintext = false, bool $ansiColors = false): string
    {
        if (is_array($array)) {
            $dump = 'array' . (count($array) ? '(' . count($array) . ')' : '(empty)');
        } elseif ($array instanceof \Countable) {
            $dump = get_class($array) . (count($array) ? '(' . count($array) . ')' : '(empty)');
        } else {
            $dump = get_class($array);
        }
        foreach ($array as $key => $value) {
            $dump .= chr(10) . str_repeat(' ', $level) . self::renderDump($key, 0, $plaintext, $ansiColors) . ' => ';
            $dump .= self::renderDump($value, $level + 1, $plaintext, $ansiColors);
        }

        return $dump;
    }
protected static function renderArrayDump ( array $ array , int $ level , bool $ plaintext = false , bool $ ansiColors = false ) : string { if ( is_array ( $ array ) ) { $ dump = 'array' . ( count ( $ array ) ? '(' . count ( $ array ) . ')' : '(empty)' ) ; } elseif ( $ array instanceof \ Countable ) { $ dump = get_class ( $ array ) . ( count ( $ array ) ? '(' . count ( $ array ) . ')' : '(empty)' ) ; } else { $ dump = get_class ( $ array ) ; } foreach ( $ array as $ key => $ value ) { $ dump .= chr ( 10 ) . str_repeat ( ' ' , $ level ) . self :: renderDump ( $ key , 0 , $ plaintext , $ ansiColors ) . ' => ' ; $ dump .= self :: renderDump ( $ value , $ level + 1 , $ plaintext , $ ansiColors ) ; } return $ dump ; }
Renders a dump of the given array

@param array $array
@param integer $level
@param boolean $plaintext
@param boolean $ansiColors
@return string
Renders a dump of the given array