3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = '<?xml version="1.0" ?>'; try { new SimpleXMLElement($a); echo "Created"; } catch (Exception $e) { echo 'Ok'; }

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for Typed properties v2
Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Start tag expected, '<' not found in /in/g7GKa on line 4 Warning: SimpleXMLElement::__construct(): <?xml version="1.0" ?> in /in/g7GKa on line 4 Warning: SimpleXMLElement::__construct(): ^ in /in/g7GKa on line 4 Ok
Output for Array change keys
Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Start tag expected, '<' not found in /in/g7GKa on line 4 Warning: SimpleXMLElement::__construct(): <?xml version="1.0" ?> in /in/g7GKa on line 4 Warning: SimpleXMLElement::__construct(): ^ in /in/g7GKa on line 4 Ok
Output for Lexical anon
Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Start tag expected, '<' not found in /in/g7GKa on line 4 Warning: SimpleXMLElement::__construct(): <?xml version="1.0" ?> in /in/g7GKa on line 4 Warning: SimpleXMLElement::__construct(): ^ in /in/g7GKa on line 4 Ok

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page