XMLWriter::toStream

Create new XMLWriter using a stream for output

Description

public static static XMLWriter::toStream(resource $stream)

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