block.php
Table of Contents
Functions
- block() : string
- Format an indented multi-line text block.
Functions
block()
Format an indented multi-line text block.
block(array<string|int, mixed>|string $input[, string|int $indent = '' ][, string $separator = PHP_EOL ][, bool $keepEmptyLines = true ]) : string
Parameters
- $input : array<string|int, mixed>|string
-
Lines as array or multi-line string.
- $indent : string|int = ''
-
Indentation as string or number of spaces.
- $separator : string = PHP_EOL
-
Line separator (defaults to PHP_EOL).
- $keepEmptyLines : bool = true
-
Whether to preserve empty lines (default: true).
Tags
Return values
string —A single string with the lines joined by $separator and indented.