3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(!class_exists('SimpleXMLElement')) die("Bonkers"); $xml = new SimpleXMLElement('<xml><node></node>'); var_dump(typeof($xml->node)); var_dump(typeof($xml->node->foo)); var_dump(isset($xml->node->foo)); var_dump(is_null($xml->node->foo));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fm3NT
function name:  (null)
number of ops:  39
compiled vars:  !0 = $xml
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'class_exists'
          1        SEND_VAL                                                 'SimpleXMLElement'
          2        DO_ICALL                                         $1      
          3        BOOL_NOT                                         ~2      $1
          4      > JMPZ                                                     ~2, ->6
          5    > > EXIT                                                     'Bonkers'
    3     6    >   NEW                                              $3      'SimpleXMLElement'
          7        SEND_VAL_EX                                              '%3Cxml%3E%3Cnode%3E%3C%2Fnode%3E'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !0, $3
    4    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL_BY_NAME                                       'typeof'
         12        CHECK_FUNC_ARG                                           
         13        FETCH_OBJ_FUNC_ARG                               $6      !0, 'node'
         14        SEND_FUNC_ARG                                            $6
         15        DO_FCALL                                      0  $7      
         16        SEND_VAR                                                 $7
         17        DO_ICALL                                                 
    5    18        INIT_FCALL                                               'var_dump'
         19        INIT_FCALL_BY_NAME                                       'typeof'
         20        CHECK_FUNC_ARG                                           
         21        FETCH_OBJ_FUNC_ARG                               $9      !0, 'node'
         22        FETCH_OBJ_FUNC_ARG                               $10     $9, 'foo'
         23        SEND_FUNC_ARG                                            $10
         24        DO_FCALL                                      0  $11     
         25        SEND_VAR                                                 $11
         26        DO_ICALL                                                 
    6    27        INIT_FCALL                                               'var_dump'
         28        FETCH_OBJ_IS                                     ~13     !0, 'node'
         29        ISSET_ISEMPTY_PROP_OBJ                           ~14     ~13, 'foo'
         30        SEND_VAL                                                 ~14
         31        DO_ICALL                                                 
    7    32        INIT_FCALL                                               'var_dump'
         33        FETCH_OBJ_R                                      ~16     !0, 'node'
         34        FETCH_OBJ_R                                      ~17     ~16, 'foo'
         35        TYPE_CHECK                                    2  ~18     ~17
         36        SEND_VAL                                                 ~18
         37        DO_ICALL                                                 
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.02 ms | 1396 KiB | 17 Q