3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyXML extends SimpleXMLElement { public function firstChild() { $children = $this->getChildren(); foreach ($children as $key => $value) break; return $value; } } $s = '<?xml version="1.0" encoding="utf-8" standalone="yes" ?>'. '<request>'. ' <body>'. ' <rows>'. ' <row id="1"/>'. ' <row id="2"/>'. ' <row id="3"/>'. ' <row2 ver="2.0">test data</row2>'. ' </rows>'. ' </body>'. '</request>'; $obj = new MyXML($s); var_dump($obj->firstChild());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/J33Gv
function name:  (null)
number of ops:  11
compiled vars:  !0 = $s, !1 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22utf-8%22+standalone%3D%22yes%22+%3F%3E%3Crequest%3E++%3Cbody%3E++++++%3Crows%3E++++++++++%3Crow+id%3D%221%22%2F%3E++++++++++%3Crow+id%3D%222%22%2F%3E++++++++++%3Crow+id%3D%223%22%2F%3E++++++++++%3Crow2+ver%3D%222.0%22%3Etest+data%3C%2Frow2%3E++++++%3C%2Frows%3E++%3C%2Fbody%3E%3C%2Frequest%3E'
   26     1        NEW                                              $3      'MyXML'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $3
   27     5        INIT_FCALL                                               'var_dump'
          6        INIT_METHOD_CALL                                         !1, 'firstChild'
          7        DO_FCALL                                      0  $6      
          8        SEND_VAR                                                 $6
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class MyXML:
Function firstchild:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
Branch analysis from position: 8
filename:       /in/J33Gv
function name:  firstChild
number of ops:  11
compiled vars:  !0 = $children, !1 = $value, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_METHOD_CALL                                         'getChildren'
          1        DO_FCALL                                      0  $3      
          2        ASSIGN                                                   !0, $3
    7     3      > FE_RESET_R                                       $5      !0, ->8
          4    > > FE_FETCH_R                                       ~6      $5, !1, ->8
          5    >   ASSIGN                                                   !2, ~6
    8     6      > JMP                                                      ->8
    7     7*       JMP                                                      ->4
          8    >   FE_FREE                                                  $5
    9     9      > RETURN                                                   !1
   10    10*     > RETURN                                                   null

End of function firstchild

End of class MyXML.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.28 ms | 1388 KiB | 15 Q