3v4l.org

run code in 300+ PHP versions simultaneously
<?php 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 SimpleXMLElement($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 SimpleXMLElement($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 = 15, Position 2 = 21
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 21
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 21
2 jumps found. (Code = 77) Position 1 = 33, Position 2 = 39
Branch analysis from position: 33
2 jumps found. (Code = 78) Position 1 = 34, Position 2 = 39
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
Branch analysis from position: 21
filename:       /in/eqedo
function name:  (null)
number of ops:  42
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                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
    8     3        ASSIGN                                                   !0, '--------------------------------------------------------------------------------%0A'
   10     4        ECHO                                                     !0
   12     5        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'
   23     6        NEW                                              $10     'SimpleXMLElement'
          7        SEND_VAR_EX                                              !1
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !2, $10
   25    10        FETCH_OBJ_R                                      ~13     !2, 'b'
         11        FETCH_OBJ_R                                      ~14     ~13, 'c'
         12        INIT_METHOD_CALL                                         ~14, 'children'
         13        DO_FCALL                                      0  $15     
         14      > FE_RESET_R                                       $16     $15, ->21
         15    > > FE_FETCH_R                                       ~17     $16, !3, ->21
         16    >   ASSIGN                                                   !4, ~17
   26    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !3
         19        DO_ICALL                                                 
   25    20      > JMP                                                      ->15
         21    >   FE_FREE                                                  $16
   29    22        ECHO                                                     !0
   31    23        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'
   40    24        NEW                                              $21     'SimpleXMLElement'
         25        SEND_VAR_EX                                              !5
         26        DO_FCALL                                      0          
         27        ASSIGN                                                   !6, $21
   42    28        FETCH_OBJ_R                                      ~24     !6, 'b'
         29        FETCH_OBJ_R                                      ~25     ~24, 'c'
         30        INIT_METHOD_CALL                                         ~25, 'children'
         31        DO_FCALL                                      0  $26     
         32      > FE_RESET_R                                       $27     $26, ->39
         33    > > FE_FETCH_R                                       ~28     $27, !3, ->39
         34    >   ASSIGN                                                   !4, ~28
   43    35        INIT_FCALL                                               'var_dump'
         36        SEND_VAR                                                 !3
         37        DO_ICALL                                                 
   42    38      > JMP                                                      ->33
         39    >   FE_FREE                                                  $27
   46    40        ECHO                                                     !0
         41      > RETURN                                                   1

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.55 ms | 1400 KiB | 17 Q