3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $writer = new XMLWriter; $writer->openMemory(); $writer->startElement('example'); $writer->text('D7007S'); $wrtier->endElement(); $xml = $writer ->outputMemory(); var_dump($xml, $xml === '<example>F7007S</example>');
Output for 7.0.5 - 7.3.0rc4
Notice: Undefined variable: wrtier in /in/92ftm on line 7 Fatal error: Uncaught Error: Call to a member function endElement() on null in /in/92ftm:7 Stack trace: #0 {main} thrown in /in/92ftm on line 7
Process exited with code 255.
Output for 7.0.0 - 7.0.4
Notice: Undefined variable: wrtier in /in/92ftm on line 7 Fatal error: Uncaught Error: Call to a member function endElement() on unknown in /in/92ftm:7 Stack trace: #0 {main} thrown in /in/92ftm on line 7
Process exited with code 255.
Output for 5.6.7 - 5.6.28
Notice: Undefined variable: wrtier in /in/92ftm on line 7 Fatal error: Call to a member function endElement() on null in /in/92ftm on line 7
Process exited with code 255.
Output for 5.1.2 - 5.5.35
Notice: Undefined variable: wrtier in /in/92ftm on line 7 Fatal error: Call to a member function endElement() on a non-object in /in/92ftm on line 7
Process exited with code 255.
Output for 5.0.0 - 5.1.1
Fatal error: Class 'XMLWriter' not found in /in/92ftm 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/92ftm 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/92ftm on line 3