phasync
Console / write

Method

Console::write

Writes $markup to the stream, styled or plain as the console is.

Description#

public Console::write(
    string $markup
): void

Parameters#

$markup string
Text with <!...> spans, see the class description

Errors / Exceptions#

ExceptionWhen
InvalidArgumentExceptionFor a pad, lpad, rpad or center without a width

Examples#

Example 1
$out = new Console();
$out->write("<!bold pad 12>--http<!><!dim>Serve HTTP here<!>\n");

See also#