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; }
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
Jump found. Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
Jump found. Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 12
Jump found. Position 1 = -2
Branch analysis from position: 12
filename:       /in/hMUaD
function name:  (null)
number of ops:  14
compiled vars:  !0 = $xml, !1 = $path, !2 = $node
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   INIT_FCALL                                               'simplexml_load_string'
  30     1        SEND_VAL                                                 '%3Citem+id%3D%221991901%22+%3E%0A++++%3Cproperty+name%3D%22image%22%3E%0A++++++++%3Cproperty%3E%0A++++++++++++%3Cproperty+name%3D%22image_realtyimagetype_id%22%3E%0A++++++++++++++++%3Cvalue%3Ep%C3%A4%C3%A4kuva%3C%2Fvalue%3E%0A++++++++++++%3C%2Fproperty%3E%0A++++++++++++%3Cproperty+name%3D%22image_itemimagetype_name%22%3E%0A+++++++++++++++%3Cvalue%3Ekivirealty-original%3C%2Fvalue%3E%0A++++++++++++%3C%2Fproperty%3E%0A++++++++++++%3Cproperty+name%3D%22image_desc%22%3E%0A+++++++++++++++%3Cvalue%3E%3C%2Fvalue%3E%0A++++++++++++%3C%2Fproperty%3E%0A++++++++++++%3Cproperty+name%3D%22image_url%22%3E%0A+++++++++++++++%3Cvalue%3Ehttp%3A%2F%2Fdomain.com%2Fimg4092288730864152376.jpg%3C%2Fvalue%3E%0A++++++++++++%3C%2Fproperty%3E%0A++++++++%3C%2Fproperty%3E%0A++++%3C%2Fproperty%3E%0A++++%3Cproperty+name%3D%22image%22%3E%0A++++++++%3Cproperty%3E%0A++++++++++++%3Cproperty+name%3D%22image_realtyimagetype_id%22%3E%0A++++++++++++++++%3Cvalue%3EIncorrect%3C%2Fvalue%3E%0A++++++++++++%3C%2Fproperty%3E%0A++++++++++++%3Cproperty+name%3D%22image_url%22%3E%0A++++++++++++++++%3Cvalue%3EIncorrect.jpg%3C%2Fvalue%3E%0A++++++++++++%3C%2Fproperty%3E%0A++++++++%3C%2Fproperty%3E%0A++++%3C%2Fproperty%3E%0A%3C%2Fitem%3E'
         2        DO_ICALL                                         $3      
         3        ASSIGN                                                   !0, $3
  33     4        ASSIGN                                                   !1, '%2F%2Fitem%2Fproperty%5B%40name%3D%22image%22%5D%2Fproperty%5Bproperty%5B%40name%3D%22image_realtyimagetype_id%22%5D%2Fvalue%2Ftext%28%29%3D%22p%C3%A4%C3%A4kuva%22%5D%2Fproperty%5B%40name%3D%22image_url%22%5D%2Fvalue%2Ftext%28%29'
  34     5        INIT_METHOD_CALL                                         !0, 'xpath'
         6        SEND_VAR_EX                                              !1
         7        DO_FCALL                                      0  $6      
         8      > FE_RESET_R                                       $7      $6, ->12
         9    > > FE_FETCH_R                                               $7, !2, ->12
  36    10    >   ECHO                                                     !2
        11      > JMP                                                      ->9
        12    >   FE_FREE                                                  $7
        13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.2.0