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); var_dump(empty($a1->b->c->children())); var_dump((bool)$a1->b->c->children()); foreach ($a1->b->c->children() as $key => $value) { var_dump((bool)(string)$value); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 31, Position 2 = 39
Branch analysis from position: 31
2 jumps found. (Code = 78) Position 1 = 32, Position 2 = 39
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
filename:       /in/5ud5l
function name:  (null)
number of ops:  41
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
   25    10        INIT_FCALL                                               'var_dump'
         11        FETCH_OBJ_R                                      ~11     !2, 'b'
         12        FETCH_OBJ_R                                      ~12     ~11, 'c'
         13        INIT_METHOD_CALL                                         ~12, 'children'
         14        DO_FCALL                                      0  $13     
         15        BOOL_NOT                                         ~14     $13
         16        SEND_VAL                                                 ~14
         17        DO_ICALL                                                 
   26    18        INIT_FCALL                                               'var_dump'
         19        FETCH_OBJ_R                                      ~16     !2, 'b'
         20        FETCH_OBJ_R                                      ~17     ~16, 'c'
         21        INIT_METHOD_CALL                                         ~17, 'children'
         22        DO_FCALL                                      0  $18     
         23        BOOL                                             ~19     $18
         24        SEND_VAL                                                 ~19
         25        DO_ICALL                                                 
   27    26        FETCH_OBJ_R                                      ~21     !2, 'b'
         27        FETCH_OBJ_R                                      ~22     ~21, 'c'
         28        INIT_METHOD_CALL                                         ~22, 'children'
         29        DO_FCALL                                      0  $23     
         30      > FE_RESET_R                                       $24     $23, ->39
         31    > > FE_FETCH_R                                       ~25     $24, !3, ->39
         32    >   ASSIGN                                                   !4, ~25
   28    33        INIT_FCALL                                               'var_dump'
         34        CAST                                          6  ~27     !3
         35        BOOL                                             ~28     ~27
         36        SEND_VAL                                                 ~28
         37        DO_ICALL                                                 
   27    38      > JMP                                                      ->31
         39    >   FE_FREE                                                  $24
   29    40      > RETURN                                                   1

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.48 ms | 1392 KiB | 17 Q