3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test_isset($str) { $xml = '<field Default="' . $str . '"/>'; $field = new SimpleXmlElement($xml); var_dump(isset($field)); var_dump(isset($field['Default'])); var_dump(isset($field['XXX'])); } test_isset(""); test_isset("No"); test_isset("Yes"); test_isset("NULL"); test_isset("0"); test_isset("1"); test_isset("20");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7M075
function name:  (null)
number of ops:  22
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'test_isset'
          1        SEND_VAL                                                 ''
          2        DO_FCALL                                      0          
   11     3        INIT_FCALL                                               'test_isset'
          4        SEND_VAL                                                 'No'
          5        DO_FCALL                                      0          
   12     6        INIT_FCALL                                               'test_isset'
          7        SEND_VAL                                                 'Yes'
          8        DO_FCALL                                      0          
   13     9        INIT_FCALL                                               'test_isset'
         10        SEND_VAL                                                 'NULL'
         11        DO_FCALL                                      0          
   14    12        INIT_FCALL                                               'test_isset'
         13        SEND_VAL                                                 '0'
         14        DO_FCALL                                      0          
   15    15        INIT_FCALL                                               'test_isset'
         16        SEND_VAL                                                 '1'
         17        DO_FCALL                                      0          
   16    18        INIT_FCALL                                               'test_isset'
         19        SEND_VAL                                                 '20'
         20        DO_FCALL                                      0          
         21      > RETURN                                                   1

Function test_isset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7M075
function name:  test_isset
number of ops:  21
compiled vars:  !0 = $str, !1 = $xml, !2 = $field
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        CONCAT                                           ~3      '%3Cfield+Default%3D%22', !0
          2        CONCAT                                           ~4      ~3, '%22%2F%3E'
          3        ASSIGN                                                   !1, ~4
    4     4        NEW                                              $6      'SimpleXmlElement'
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !2, $6
    5     8        INIT_FCALL                                               'var_dump'
          9        ISSET_ISEMPTY_CV                                 ~9      !2
         10        SEND_VAL                                                 ~9
         11        DO_ICALL                                                 
    6    12        INIT_FCALL                                               'var_dump'
         13        ISSET_ISEMPTY_DIM_OBJ                         0  ~11     !2, 'Default'
         14        SEND_VAL                                                 ~11
         15        DO_ICALL                                                 
    7    16        INIT_FCALL                                               'var_dump'
         17        ISSET_ISEMPTY_DIM_OBJ                         0  ~13     !2, 'XXX'
         18        SEND_VAL                                                 ~13
         19        DO_ICALL                                                 
    8    20      > RETURN                                                   null

End of function test_isset

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.29 ms | 1407 KiB | 22 Q