3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<'XML' <root xmlns:s="http://some-address.com"> <s:Label x="10" y="10" text="NOME"/> <s:TextInput id="NOME" x="10" y="21" width="290" tabIndex="1"/> <s:Label x="10" y="50" text="TELEFONE"/> <s:Label x="120" y="50" text="RAMAL"/> <s:TextInput id="RAMAL" x="120" y="61" width="102" tabIndex="5"/> <s:Label x="365" y="50" text="LOGIN"/> <s:TextInput id="LOGIN1" x="365" y="61" width="102" tabIndex="7"/> <s:TextInput id="TELEFONE" x="10" y="61" width="102" tabIndex="4"/> <s:Label x="308" y="11" text="EMAIL"/> <s:TextInput id="EMAIL" x="308" y="22" width="290" tabIndex="2"/> <s:Label x="605" y="10" text="MATRICULA"/> <s:TextInput id="MATRICULA" x="606" y="22" width="144" tabIndex="3"/> <s:Label x="627" y="91" text="NASCIMENTO"/> <s:TextInput id="NASCIMENTO" x="627" y="103" width="121" tabIndex="14"/> </root> XML; $simpleXML = new SimpleXMLElement($xml); $xpathTextInput = $simpleXML->xpath('s:TextInput'); foreach($xpathTextInput as $input) { echo $input['id'] . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/EB3ah
function name:  (null)
number of ops:  17
compiled vars:  !0 = $xml, !1 = $simpleXML, !2 = $xpathTextInput, !3 = $input
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Croot+xmlns%3As%3D%22http%3A%2F%2Fsome-address.com%22%3E%0A++++%3Cs%3ALabel+x%3D%2210%22+y%3D%2210%22+text%3D%22NOME%22%2F%3E%0A++++%3Cs%3ATextInput+id%3D%22NOME%22+x%3D%2210%22+y%3D%2221%22+width%3D%22290%22+tabIndex%3D%221%22%2F%3E%0A++++%3Cs%3ALabel+x%3D%2210%22+y%3D%2250%22+text%3D%22TELEFONE%22%2F%3E%0A++++%3Cs%3ALabel+x%3D%22120%22+y%3D%2250%22+text%3D%22RAMAL%22%2F%3E%0A++++%3Cs%3ATextInput+id%3D%22RAMAL%22+x%3D%22120%22+y%3D%2261%22+width%3D%22102%22+tabIndex%3D%225%22%2F%3E%0A++++%3Cs%3ALabel+x%3D%22365%22+y%3D%2250%22+text%3D%22LOGIN%22%2F%3E%0A++++%3Cs%3ATextInput+id%3D%22LOGIN1%22+x%3D%22365%22+y%3D%2261%22+width%3D%22102%22+tabIndex%3D%227%22%2F%3E%0A++++%3Cs%3ATextInput+id%3D%22TELEFONE%22+x%3D%2210%22+y%3D%2261%22+width%3D%22102%22+tabIndex%3D%224%22%2F%3E%0A++++%3Cs%3ALabel+x%3D%22308%22+y%3D%2211%22+text%3D%22EMAIL%22%2F%3E%0A++++%3Cs%3ATextInput+id%3D%22EMAIL%22+x%3D%22308%22+y%3D%2222%22+width%3D%22290%22+tabIndex%3D%222%22%2F%3E%0A++++%3Cs%3ALabel+x%3D%22605%22+y%3D%2210%22+text%3D%22MATRICULA%22%2F%3E%0A++++%3Cs%3ATextInput+id%3D%22MATRICULA%22+x%3D%22606%22+y%3D%2222%22+width%3D%22144%22++tabIndex%3D%223%22%2F%3E%0A++++%3Cs%3ALabel+x%3D%22627%22+y%3D%2291%22+text%3D%22NASCIMENTO%22%2F%3E%0A++++%3Cs%3ATextInput+id%3D%22NASCIMENTO%22+x%3D%22627%22+y%3D%22103%22+width%3D%22121%22+tabIndex%3D%2214%22%2F%3E%0A%3C%2Froot%3E'
   22     1        NEW                                              $5      'SimpleXMLElement'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $5
   23     5        INIT_METHOD_CALL                                         !1, 'xpath'
          6        SEND_VAL_EX                                              's%3ATextInput'
          7        DO_FCALL                                      0  $8      
          8        ASSIGN                                                   !2, $8
   25     9      > FE_RESET_R                                       $10     !2, ->15
         10    > > FE_FETCH_R                                               $10, !3, ->15
   26    11    >   FETCH_DIM_R                                      ~11     !3, 'id'
         12        CONCAT                                           ~12     ~11, '%0A'
         13        ECHO                                                     ~12
   25    14      > JMP                                                      ->10
         15    >   FE_FREE                                                  $10
   27    16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.41 ms | 996 KiB | 13 Q