3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = "<root><first/><second/><third/></root>"; $xml = simplexml_load_string($xml); foreach ($xml->children() as $tag => $el) { var_dump($tag, $el); var_dump($xml->$tag == $el); }
Output for git.master_jit
/bin/php-git-master: error while loading shared libraries: libonig.so.5: cannot open shared object file: No such file or directory
Process exited with code 127.
Output for git.master, rfc.property-hooks
string(5) "first" object(SimpleXMLElement)#4 (0) { } bool(false) string(6) "second" object(SimpleXMLElement)#5 (0) { } bool(false) string(5) "third" object(SimpleXMLElement)#4 (0) { } bool(false)

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