3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('display_errors', 1); error_reporting(E_ALL | E_STRICT); class A extends SimpleXMLElement { } $delimiter = "--------------------------------------------------------------------------------\n"; echo $delimiter; $xml1 = <<<XML <?xml version="1.0"?> <a> <b> <c> <value attr="Some Attr">Some Value</value> </c> </b> </a> XML; $a1 = new A($xml1); foreach ($a1->b->c->children() as $key => $value) { var_dump($value); } echo $delimiter; $xml2 = <<<XML <?xml version="1.0"?> <a> <b> <c><value attr="Some Attr">Some Value</value></c> </b> </a> XML; $a2 = new A($xml2); foreach ($a2->b->c->children() as $key => $value) { var_dump($value); } echo $delimiter;;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 25
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 25
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 25
2 jumps found. (Code = 77) Position 1 = 37, Position 2 = 43
Branch analysis from position: 37
2 jumps found. (Code = 78) Position 1 = 38, Position 2 = 43
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 43
Branch analysis from position: 25
filename:       /in/7o12W
function name:  (null)
number of ops:  46
compiled vars:  !0 = $delimiter, !1 = $xml1, !2 = $a1, !3 = $value, !4 = $key, !5 = $xml2, !6 = $a2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'ini_set'
          1        SEND_VAL                                                 'display_errors'
          2        SEND_VAL                                                 1
          3        DO_ICALL                                                 
    3     4        INIT_FCALL                                               'error_reporting'
          5        SEND_VAL                                                 32767
          6        DO_ICALL                                                 
    9     7        ASSIGN                                                   !0, '--------------------------------------------------------------------------------%0A'
   11     8        ECHO                                                     !0
   13     9        ASSIGN                                                   !1, '%3C%3Fxml+version%3D%221.0%22%3F%3E%0A%3Ca%3E%0A++++%3Cb%3E%0A++++++++%3Cc%3E%0A++++++++++++%3Cvalue+attr%3D%22Some+Attr%22%3ESome+Value%3C%2Fvalue%3E%0A++++++++%3C%2Fc%3E%0A++++%3C%2Fb%3E%0A%3C%2Fa%3E'
   24    10        NEW                                              $11     'A'
         11        SEND_VAR_EX                                              !1
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !2, $11
   26    14        FETCH_OBJ_R                                      ~14     !2, 'b'
         15        FETCH_OBJ_R                                      ~15     ~14, 'c'
         16        INIT_METHOD_CALL                                         ~15, 'children'
         17        DO_FCALL                                      0  $16     
         18      > FE_RESET_R                                       $17     $16, ->25
         19    > > FE_FETCH_R                                       ~18     $17, !3, ->25
         20    >   ASSIGN                                                   !4, ~18
   27    21        INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !3
         23        DO_ICALL                                                 
   26    24      > JMP                                                      ->19
         25    >   FE_FREE                                                  $17
   30    26        ECHO                                                     !0
   32    27        ASSIGN                                                   !5, '%3C%3Fxml+version%3D%221.0%22%3F%3E%0A%3Ca%3E%0A++++%3Cb%3E%0A++++++++%3Cc%3E%3Cvalue+attr%3D%22Some+Attr%22%3ESome+Value%3C%2Fvalue%3E%3C%2Fc%3E%0A++++%3C%2Fb%3E%0A%3C%2Fa%3E'
   41    28        NEW                                              $22     'A'
         29        SEND_VAR_EX                                              !5
         30        DO_FCALL                                      0          
         31        ASSIGN                                                   !6, $22
   43    32        FETCH_OBJ_R                                      ~25     !6, 'b'
         33        FETCH_OBJ_R                                      ~26     ~25, 'c'
         34        INIT_METHOD_CALL                                         ~26, 'children'
         35        DO_FCALL                                      0  $27     
         36      > FE_RESET_R                                       $28     $27, ->43
         37    > > FE_FETCH_R                                       ~29     $28, !3, ->43
         38    >   ASSIGN                                                   !4, ~29
   44    39        INIT_FCALL                                               'var_dump'
         40        SEND_VAR                                                 !3
         41        DO_ICALL                                                 
   43    42      > JMP                                                      ->37
         43    >   FE_FREE                                                  $28
   47    44        ECHO                                                     !0
         45      > RETURN                                                   1

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.25 ms | 1400 KiB | 19 Q