3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = new SimpleXMLElement( '<person> <child role="son"> <child role="daughter"/> </child> <child role="daughter"> <child role="son"> <child role="son"/> </child> </child> </person>'); foreach ($xml->children() as $second_gen) { echo ' The person begot a ' . $second_gen['role']; foreach ($second_gen->children() as $third_gen) { echo ' who begot a ' . $third_gen['role'] . ';'; foreach ($third_gen->children() as $fourth_gen) { echo ' and that ' . $third_gen['role'] . ' begot a ' . $fourth_gen['role']; } } }
Output for git.master, git.master_jit, rfc.property-hooks
The person begot a son who begot a daughter; The person begot a daughter who begot a son; and that son begot a son

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.63 ms | 401 KiB | 8 Q