3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = simplexml_load_string('<root/>'); $node = $xml->NOT_EXISTING_NODE_NAME; var_dump($node instanceof \SimpleXMLElement); var_dump($node->asXML()); var_dump($node->count()); var_dump($node->getName()); echo "\nattributes:\n"; $node2 = $node->attributes(); var_dump($node2 instanceof \SimpleXMLElement); var_dump($node2->asXML()); var_dump($node2->count()); var_dump($node2->getName()); echo "\nchildren:\n"; $node3 = $node->children(); var_dump($node3 instanceof \SimpleXMLElement); var_dump($node3->asXML()); var_dump($node3->count()); var_dump($node3->getName());
Output for git.master, git.master_jit, rfc.property-hooks
bool(true) bool(false) int(0) string(0) "" attributes: bool(false) Fatal error: Uncaught Error: Call to a member function asXML() on null in /in/1BHKS:13 Stack trace: #0 {main} thrown in /in/1BHKS on line 13
Process exited with code 255.

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:
58.98 ms | 401 KiB | 8 Q