3v4l.org

run code in 500+ PHP versions simultaneously
<?php $foo = simplexml_load_string("<foo><bar>aa</bar>\n</foo>"); var_dump((bool) $foo->bar[0]); var_dump((string) $foo->bar[0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bUncK
function name:  (null)
number of ops:  17
compiled vars:  !0 = $foo
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'simplexml_load_string'
          1        SEND_VAL                                                     '%3Cfoo%3E%3Cbar%3Eaa%3C%2Fbar%3E%0A%3C%2Ffoo%3E'
          2        DO_ICALL                                             $1      
          3        ASSIGN                                                       !0, $1
    4     4        INIT_FCALL                                                   'var_dump'
          5        FETCH_OBJ_R                                          ~3      !0, 'bar'
          6        FETCH_DIM_R                                          ~4      ~3, 0
          7        BOOL                                                 ~5      ~4
          8        SEND_VAL                                                     ~5
          9        DO_ICALL                                                     
    5    10        INIT_FCALL                                                   'var_dump'
         11        FETCH_OBJ_R                                          ~7      !0, 'bar'
         12        FETCH_DIM_R                                          ~8      ~7, 0
         13        CAST                                              6  ~9      ~8
         14        SEND_VAL                                                     ~9
         15        DO_ICALL                                                     
         16      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.5 ms | 2805 KiB | 15 Q