3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $xml=simplexml_load_string(<<<XML <item id="1991901" > <property name="image"> <property> <property name="image_realtyimagetype_id"> <value>pääkuva</value> </property> <property name="image_itemimagetype_name"> <value>kivirealty-original</value> </property> <property name="image_desc"> <value></value> </property> <property name="image_url"> <value>http://domain.com/img4092288730864152376.jpg</value> </property> </property> </property> <property name="image"> <property> <property name="image_realtyimagetype_id"> <value>Incorrect</value> </property> <property name="image_url"> <value>Incorrect.jpg</value> </property> </property> </property> </item> XML ); $path='//item/property[@name="image"]/property[property[@name="image_realtyimagetype_id"]/value/text()="pääkuva"]/property[@name="image_url"]/value/text()'; foreach($xml->xpath($path) as $node) { echo $node; }

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
http://domain.com/img4092288730864152376.jpg
Output for Array change keys
http://domain.com/img4092288730864152376.jpg
Output for Lexical anon
http://domain.com/img4092288730864152376.jpg

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