3v4l.org

run code in 500+ PHP versions simultaneously
<?php var_dump( (bool)simplexml_load_string('<root />'), (bool)simplexml_load_string('<root><branch /></root>')->branch, (bool)simplexml_load_string('<root><branch></branch></root>')->branch, (bool)simplexml_load_string('<root><otherbranch /><branch /></root>')->branch, (bool)simplexml_load_string('<root><branch /><branch /></root>')->branch[0], (bool)simplexml_load_string('<root><branch /><branch></branch></root>')->branch[1], );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qIH4a
function name:  (null)
number of ops:  40
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'var_dump'
    4     1        INIT_FCALL                                                   'simplexml_load_string'
          2        SEND_VAL                                                     '%3Croot+%2F%3E'
          3        DO_ICALL                                             $0      
          4        BOOL                                                 ~1      $0
          5        SEND_VAL                                                     ~1
    5     6        INIT_FCALL                                                   'simplexml_load_string'
          7        SEND_VAL                                                     '%3Croot%3E%3Cbranch+%2F%3E%3C%2Froot%3E'
          8        DO_ICALL                                             $2      
          9        FETCH_OBJ_R                                          ~3      $2, 'branch'
         10        BOOL                                                 ~4      ~3
         11        SEND_VAL                                                     ~4
    6    12        INIT_FCALL                                                   'simplexml_load_string'
         13        SEND_VAL                                                     '%3Croot%3E%3Cbranch%3E%3C%2Fbranch%3E%3C%2Froot%3E'
         14        DO_ICALL                                             $5      
         15        FETCH_OBJ_R                                          ~6      $5, 'branch'
         16        BOOL                                                 ~7      ~6
         17        SEND_VAL                                                     ~7
    7    18        INIT_FCALL                                                   'simplexml_load_string'
         19        SEND_VAL                                                     '%3Croot%3E%3Cotherbranch+%2F%3E%3Cbranch+%2F%3E%3C%2Froot%3E'
         20        DO_ICALL                                             $8      
         21        FETCH_OBJ_R                                          ~9      $8, 'branch'
         22        BOOL                                                 ~10     ~9
         23        SEND_VAL                                                     ~10
    8    24        INIT_FCALL                                                   'simplexml_load_string'
         25        SEND_VAL                                                     '%3Croot%3E%3Cbranch+%2F%3E%3Cbranch+%2F%3E%3C%2Froot%3E'
         26        DO_ICALL                                             $11     
         27        FETCH_OBJ_R                                          ~12     $11, 'branch'
         28        FETCH_DIM_R                                          ~13     ~12, 0
         29        BOOL                                                 ~14     ~13
         30        SEND_VAL                                                     ~14
    9    31        INIT_FCALL                                                   'simplexml_load_string'
         32        SEND_VAL                                                     '%3Croot%3E%3Cbranch+%2F%3E%3Cbranch%3E%3C%2Fbranch%3E%3C%2Froot%3E'
         33        DO_ICALL                                             $15     
         34        FETCH_OBJ_R                                          ~16     $15, 'branch'
         35        FETCH_DIM_R                                          ~17     ~16, 1
         36        BOOL                                                 ~18     ~17
         37        SEND_VAL                                                     ~18
    3    38        DO_ICALL                                                     
   10    39      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.44 ms | 2006 KiB | 15 Q