3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $writer = new XMLWriter; $writer->openMemory(); $writer->startElement('example'); $writer->text('D7007S'); $writer->endElement(); $xml = $writer ->outputMemory(); var_dump($xml, $xml === '<example>D7007S</example>');
Output for 5.1.2 - 7.1.0
string(25) "<example>D7007S</example>" bool(true)
Output for 5.0.0 - 5.1.1
Fatal error: Class 'XMLWriter' not found in /in/vsghJ on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: xmlwriter in /in/vsghJ on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: xmlwriter in /in/vsghJ on line 3