3v4l.org

run code in 300+ PHP versions simultaneously
<?php // 空 XML を bool にキャストすると false $falsy = new SimpleXMLElement('<bool></bool>'); var_dump((bool)$falsy);// false // 中身のある XML を bool にキャストすると true $truthy = new SimpleXMLElement('<bool><true/></bool>'); var_dump((bool)$truthy);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2TOTI
function name:  (null)
number of ops:  17
compiled vars:  !0 = $falsy, !1 = $truthy
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $2      'SimpleXMLElement'
          1        SEND_VAL_EX                                              '%3Cbool%3E%3C%2Fbool%3E'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    5     4        INIT_FCALL                                               'var_dump'
          5        BOOL                                             ~5      !0
          6        SEND_VAL                                                 ~5
          7        DO_ICALL                                                 
    8     8        NEW                                              $7      'SimpleXMLElement'
          9        SEND_VAL_EX                                              '%3Cbool%3E%3Ctrue%2F%3E%3C%2Fbool%3E'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $7
    9    12        INIT_FCALL                                               'var_dump'
         13        BOOL                                             ~10     !1
         14        SEND_VAL                                                 ~10
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
133.52 ms | 1444 KiB | 14 Q