3v4l.org

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

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
174.02 ms | 3519 KiB | 16 Q