3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $xmlstr = '<?xml version="1.0" encoding="utf-8"?><customers></customers>'; $sxe = new SimpleXMLElement($xmlstr); $sxe->addAttribute('type', 'documentary'); $movie = $sxe->addChild('movie'); $movie->addChild('title', htmslpecialchars('PHP2: More & Parser Stories')); $movie->addChild('plot', 'This is all about the people who make it work.'); $characters = $movie->addChild('characters'); $character = $characters->addChild('character'); $character->addChild('name', 'Mr. Parser'); $character->addChild('actor', 'John Doe'); $rating = $movie->addChild('rating', '5'); $rating->addAttribute('type', 'stars'); echo $sxe->asXML();
based on dAV8t
Output for 7.1.0 - 7.3.0rc3
Fatal error: Uncaught Error: Call to undefined function htmslpecialchars() in /in/pSEO1:9 Stack trace: #0 {main} thrown in /in/pSEO1 on line 9
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: Call to undefined function htmslpecialchars() in /in/pSEO1:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
Fatal error: Uncaught Error: Call to undefined function htmslpecialchars() in /in/pSEO1:9 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Call to undefined function htmslpecialchars() in /in/pSEO1 on line 9
Process exited with code 255.