3v4l.org

run code in 200+ php & hhvm versions
<?php $writer = new XMLWriter(); $writer->openMemory(); $writer->startElement("tag-(with)-brackets"); $writer->endElement(); var_dump($writer->outputMemory());
based on dgHCD
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.3.1
Warning: XMLWriter::startElement(): Invalid Element Name in /in/OurBC on line 5 string(0) ""
Output for hhvm-3.12.14 - 3.17.3
Warning: invalid element name: tag-(with)-brackets in /in/OurBC on line 5 string(0) ""