php8.5
Home/ Manual/ xmlwriter / xmlwriter/ XMLWriter::toStream

XMLWriter::toStream

PHP function Edit on GitHub ✎

(PHP 8 >= 8.4.0)

Create new XMLWriter using a stream for output

Description

XMLWriter::toStream(resource $stream): static

Creates a new XMLWriter using a stream for output.

Parameters

stream

The stream to use for output.

Return Values

Returns an XMLWriter.

Errors/Exceptions

  • Passing a resource that is not a stream to stream will throw a TypeError.

See Also

  • XMLWriter::toMemory
  • XMLWriter::toUri

Source: reference/xmlwriter/xmlwriter/tostream.xml · from the official PHP manual (php/doc-en)