XML::__toString()

Converts the XML object to string.

Table of Contents
  1. Description
  2. Example

Description

XML::__toString(): string;

This method will be called when you cast a XML instance as a string. This method converts the object into its string representation.

Example

$node = new XML(['svg', "", ['version' => '1.1']]);

echo $node; // Returns `'<svg version="1.1"></svg>'`

XML::__toString()

Converts the XML object to string.