src/Console/Command/HelpCommand.php
public static function toString($value)
    {
        if (\is_array($value)) {
            // Output modifications:
            // - remove new-lines
            // - combine multiple whitespaces
            // - switch array-syntax to short array-syntax
            // - remove whitespace at array opening
            // - remove trailing array comma and whitespace at array closing
            // - remove numeric array indexes
            static $replaces = [
                ['#\r|\n#', '#\s{1,}#', '#array\s*\((.*)\)#s', '#\[\s+#', '#,\s*\]#', '#\d+\s*=>\s*#'],
                ['', ' ', '[$1]', '[', ']', ''],
            ];

            $str = var_export($value, true);
            do {
                $strNew = Preg::replace(
                    $replaces[0],
                    $replaces[1],
                    $str
                );

                if ($strNew === $str) {
                    break;
                }

                $str = $strNew;
            } while (true);
        } else {
            $str = var_export($value, true);
        }

        return Preg::replace('/\bNULL\b/', 'null', $str);
    }
public static function toString($value)
    {
        if (\is_array($value)) {
            // Output modifications:
            // - remove new-lines
            // - combine multiple whitespaces
            // - switch array-syntax to short array-syntax
            // - remove whitespace at array opening
            // - remove trailing array comma and whitespace at array closing
            // - remove numeric array indexes
            static $replaces = [
                ['#\r|\n#', '#\s{1,}#', '#array\s*\((.*)\)#s', '#\[\s+#', '#,\s*\]#', '#\d+\s*=>\s*#'],
                ['', ' ', '[$1]', '[', ']', ''],
            ];

            $str = var_export($value, true);
            do {
                $strNew = Preg::replace(
                    $replaces[0],
                    $replaces[1],
                    $str
                );

                if ($strNew === $str) {
                    break;
                }

                $str = $strNew;
            } while (true);
        } else {
            $str = var_export($value, true);
        }

        return Preg::replace('/\bNULL\b/', 'null', $str);
    }
public static function toString ( $ value ) { if ( \ is_array ( $ value ) ) { // Output modifications: // - remove new-lines // - combine multiple whitespaces // - switch array-syntax to short array-syntax // - remove whitespace at array opening // - remove trailing array comma and whitespace at array closing // - remove numeric array indexes static $ replaces = [ [ '#\r|\n#' , '#\s{1,}#' , '#array\s*\((.*)\)#s' , '#\[\s+#' , '#,\s*\]#' , '#\d+\s*=>\s*#' ] , [ '' , ' ' , '[$1]' , '[' , ']' , '' ] , ] ; $ str = var_export ( $ value , true ) ; do { $ strNew = Preg :: replace ( $ replaces [ 0 ] , $ replaces [ 1 ] , $ str ) ; if ( $ strNew === $ str ) { break ; } $ str = $ strNew ; } while ( true ) ; } else { $ str = var_export ( $ value , true ) ; } return Preg :: replace ( '/\bNULL\b/' , 'null' , $ str ) ; }
@param mixed $value

@return string
@param mixed $value