3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php phpinfo(); $xmlstr='<mainGroup> <groupHeading type="heading">This is a sample heading</groupHeading> <group type="groupType1"> <title>Title1</title> <date when="0001"></date> </group> <group type="groupType1"> <title>Title2</title> <date when="0002"></date> </group> <group type="groupType2"> <title>Title3</title> <date when="0003"></date> </group> </mainGroup>'; $xml=simplexml_load_string($xmlstr); // now loop through all <groupheading>, we use an xpath-query... foreach ($xml->xpath("//groupheading") as $gh) { echo $gh; } ?>

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for Typed properties v2
Warning: phpinfo() has been disabled for security reasons in /in/hru9M on line 2
Output for Arrow functions
Warning: phpinfo() has been disabled for security reasons in /in/hru9M on line 2
Output for Object typehint
Warning: phpinfo() has been disabled for security reasons in /in/hru9M on line 2
Output for Array change keys
Warning: phpinfo() has been disabled for security reasons in /in/hru9M on line 2
Output for Lexical anon
Warning: phpinfo() has been disabled for security reasons in /in/hru9M on line 2

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