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>Some Value</value> </c> </b> </a> XML; $a1 = new A($xml1); foreach ($a1->b->c->children() as $key => $value) { var_dump((bool)$value); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 22
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 22
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/8ZT2Y
function name:  (null)
number of ops:  24
compiled vars:  !0 = $delimiter, !1 = $xml1, !2 = $a1, !3 = $value, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
    9     3        ASSIGN                                                   !0, '--------------------------------------------------------------------------------%0A'
   11     4        ECHO                                                     !0
   13     5        ASSIGN                                                   !1, '%3C%3Fxml+version%3D%221.0%22%3F%3E%0A%3Ca%3E%0A++++%3Cb%3E%0A++++++++%3Cc%3E%0A++++++++++++%3Cvalue%3ESome+Value%3C%2Fvalue%3E%0A++++++++%3C%2Fc%3E%0A++++%3C%2Fb%3E%0A%3C%2Fa%3E'
   24     6        NEW                                              $8      'A'
          7        SEND_VAR_EX                                              !1
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !2, $8
   26    10        FETCH_OBJ_R                                      ~11     !2, 'b'
         11        FETCH_OBJ_R                                      ~12     ~11, 'c'
         12        INIT_METHOD_CALL                                         ~12, 'children'
         13        DO_FCALL                                      0  $13     
         14      > FE_RESET_R                                       $14     $13, ->22
         15    > > FE_FETCH_R                                       ~15     $14, !3, ->22
         16    >   ASSIGN                                                   !4, ~15
   27    17        INIT_FCALL                                               'var_dump'
         18        BOOL                                             ~17     !3
         19        SEND_VAL                                                 ~17
         20        DO_ICALL                                                 
   26    21      > JMP                                                      ->15
         22    >   FE_FREE                                                  $14
   28    23      > RETURN                                                   1

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.4 ms | 1395 KiB | 17 Q