3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str=<<<XML <control> <prop name='prop_id' value='panel_right_5'/> <prop name='prop_type' value='panel'/> <prop name='width' value='192px'/> <prop name='height' value='208px'/> <prop name='float' value='left'/> <prop name='margin-left' value='2px'/> <prop name='margin-top' value='1px'/> <controls> <control> <prop name='prop_id' value='0'/> <prop name='prop_type' value='button'/> <prop name='prop_style_class' value='estilo_panel_5'/> <prop name='prop_action' value='1'/> <prop name='prop_action_value' value='0'/> <prop name='prop_text1' value='0'/> <prop name='prop_text1_valign' value='middle'/> <prop name='prop_text1_halign' value='center'/> <prop name='width' value='62px'/> <prop name='height' value='50px'/> </control> <control> <prop name='prop_id' value='00'/> <prop name='prop_type' value='button'/> <prop name='prop_style_class' value='estilo_panel_5'/> <prop name='prop_action' value='46'/> <prop name='prop_action_value' value='00'/> <prop name='prop_text1' value='00'/> <prop name='prop_text1_valign' value='middle'/> <prop name='prop_text1_halign' value='center'/> <prop name='width' value='62px'/> <prop name='height' value='50px'/> </control> <control> <prop name='prop_id' value=','/> <prop name='prop_type' value='button'/> <prop name='prop_style_class' value='estilo_panel_5'/> <prop name='prop_action' value='46'/> <prop name='prop_action_value' value=','/> <prop name='prop_text1' value=','/> <prop name='prop_text1_valign' value='middle'/> <prop name='prop_text1_halign' value='center'/> <prop name='width' value='62px'/> <prop name='height' value='50px'/> </control> </controls> </control> XML; $xml=simplexml_load_string($str); $result=$xml->xpath("//control/prop[@name='prop_action'][@value='46']/../prop[@name='prop_id']"); foreach($result as $control) { echo $control['value']."\n\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
00 ,

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:
37.32 ms | 401 KiB | 8 Q