3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml='<workout_file> <workout> <FreeRide Duration="300" Power="1.3"/> <SteadyState Duration="300" Power="0.55"/> <FreeRide Duration="10" Power="1.2"/> <SteadyState Duration="180" Power="0.55"/> <FreeRide Duration="10" Power="1.1"/> <SteadyState Duration="120" Power="0.55"/> </workout> </workout_file>'; $xml=simplexml_load_string($xml); $count = 0; foreach($xml->workout->children() as $node ){ $type = $node->getName(); echo $type." position: ".$count."<br>"; $count++; //Get Attributes echo "Duration: ".$node['Duration']."<br>"; echo "Power: ".$node['Power']."<br>"; }
Output for git.master, git.master_jit, rfc.property-hooks
FreeRide position: 0<br>Duration: 300<br>Power: 1.3<br>SteadyState position: 1<br>Duration: 300<br>Power: 0.55<br>FreeRide position: 2<br>Duration: 10<br>Power: 1.2<br>SteadyState position: 3<br>Duration: 180<br>Power: 0.55<br>FreeRide position: 4<br>Duration: 10<br>Power: 1.1<br>SteadyState position: 5<br>Duration: 120<br>Power: 0.55<br>

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