← All docs

xmlwriter_flush()

Flushes the buffer: the buffered string for a memory writer, the byte count written for a URI writer.

xmlwriter_flush()

function xmlwriter_flush(mixed $writer, bool $empty = true): mixed

Flushes the buffer: the buffered string for a memory writer, the byte count written for a URI writer.

Parameters:

  • $writer (mixed)
  • $empty (bool), default true, optional

Returns: mixed

Availability

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how xmlwriter_flush is implemented in the compiler, see the internals page.