3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<EOT <?xml version="1.0" ?> <Y><X>6098881</X></Y> EOT; $sxml = new SimpleXMLElement($xml); foreach ($sxml->children() as $xmlKey => $xmlNode) { var_dump( empty($xmlNode), (string) $xmlNode, $xmlNode->asxml() ); } $xmlNode = new SimpleXMLElement('<X>501936634a721</X>'); var_dump( empty($xmlNode), (string) $xmlNode, $xmlNode->asxml() );
Output for git.master, git.master_jit, rfc.property-hooks
bool(false) string(7) "6098881" string(14) "<X>6098881</X>" bool(false) string(13) "501936634a721" string(43) "<?xml version="1.0"?> <X>501936634a721</X> "

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

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


preferences:
43.76 ms | 401 KiB | 8 Q