3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new SimpleXMLElement(); $b = new SimpleXMLElement('<foo />'); $c = new SimpleXMLElement('<foo><bar /></foo>'); var_dump([(bool) $a, (bool) $b, (bool) $c]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tgtpr
function name:  (null)
number of ops:  21
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'SimpleXMLElement'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    4     3        NEW                                              $6      'SimpleXMLElement'
          4        SEND_VAL_EX                                              '%3Cfoo+%2F%3E'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $6
    5     7        NEW                                              $9      'SimpleXMLElement'
          8        SEND_VAL_EX                                              '%3Cfoo%3E%3Cbar+%2F%3E%3C%2Ffoo%3E'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $9
    6    11        INIT_FCALL                                               'var_dump'
         12        BOOL                                             ~12     !0
         13        INIT_ARRAY                                       ~13     ~12
         14        BOOL                                             ~14     !1
         15        ADD_ARRAY_ELEMENT                                ~13     ~14
         16        BOOL                                             ~15     !2
         17        ADD_ARRAY_ELEMENT                                ~13     ~15
         18        SEND_VAL                                                 ~13
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.28 ms | 1395 KiB | 15 Q