3v4l.org

run code in 300+ PHP versions simultaneously
<?php $document = new DOMDocument(); $document->loadXML('<element attribute="value"/>'); $attribute = $document->documentElement->getAttributeNode('attribute'); var_dump($attribute->textContent); $attribute->textContent = 'new value'; var_dump($attribute->textContent); echo $document->saveXML();
Output for git.master, git.master_jit
string(5) "value" string(0) "" <?xml version="1.0"?> <element attribute=""/>
Output for rfc.property-hooks
string(5) "value" string(9) "new value" <?xml version="1.0"?> <element attribute="new value"/>

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:
26.58 ms | 406 KiB | 5 Q