3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmlstr="<properties> <property>name</property><value>john</value> <property>surname</property><value>wayne</value> <property>age</property><value>33</value> <property>blaaa</property><value>blaa</value> </properties>"; $xml = simplexml_load_string($xmlstr); $prop = $xml->xpath('//property'); $value = $xml->xpath('//value'); $count=count($prop)-1; for ($i=0;$i<=$count;$i++) { echo $prop[0],$value[0]; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 18
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 18
Branch analysis from position: 25
Branch analysis from position: 18
filename:       /in/293vQ
function name:  (null)
number of ops:  26
compiled vars:  !0 = $xmlstr, !1 = $xml, !2 = $prop, !3 = $value, !4 = $count, !5 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cproperties%3E%0A%3Cproperty%3Ename%3C%2Fproperty%3E%3Cvalue%3Ejohn%3C%2Fvalue%3E%0A%3Cproperty%3Esurname%3C%2Fproperty%3E%3Cvalue%3Ewayne%3C%2Fvalue%3E%0A%3Cproperty%3Eage%3C%2Fproperty%3E%3Cvalue%3E33%3C%2Fvalue%3E%0A%3Cproperty%3Eblaaa%3C%2Fproperty%3E%3Cvalue%3Eblaa%3C%2Fvalue%3E%0A%3C%2Fproperties%3E'
   10     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $7      
          4        ASSIGN                                                   !1, $7
   12     5        INIT_METHOD_CALL                                         !1, 'xpath'
          6        SEND_VAL_EX                                              '%2F%2Fproperty'
          7        DO_FCALL                                      0  $9      
          8        ASSIGN                                                   !2, $9
   13     9        INIT_METHOD_CALL                                         !1, 'xpath'
         10        SEND_VAL_EX                                              '%2F%2Fvalue'
         11        DO_FCALL                                      0  $11     
         12        ASSIGN                                                   !3, $11
   15    13        COUNT                                            ~13     !2
         14        SUB                                              ~14     ~13, 1
         15        ASSIGN                                                   !4, ~14
   17    16        ASSIGN                                                   !5, 0
         17      > JMP                                                      ->23
   18    18    >   FETCH_DIM_R                                      ~17     !2, 0
         19        ECHO                                                     ~17
         20        FETCH_DIM_R                                      ~18     !3, 0
         21        ECHO                                                     ~18
   17    22        PRE_INC                                                  !5
         23    >   IS_SMALLER_OR_EQUAL                                      !5, !4
         24      > JMPNZ                                                    ~20, ->18
   19    25    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.67 ms | 1396 KiB | 15 Q