3v4l.org

run code in 300+ PHP versions simultaneously
<?php $c = new c(); var_dump(isset($c->a)); // no problem var_dump(isset($c->a->b)); // undefined index: a var_dump(isset($c->b->c)); // undefined index: b var_dump(isset($c->d['e'])); // undefined index: d class c { public $x = array(); public function __get($name) { return $this->__isset($name) ? $this->x[$name] : null; } public function __isset($name) { return isset($this->x[$name]); } } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IDfeo
function name:  (null)
number of ops:  23
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $1      'c'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    3     3        INIT_FCALL                                               'var_dump'
          4        ISSET_ISEMPTY_PROP_OBJ                           ~4      !0, 'a'
          5        SEND_VAL                                                 ~4
          6        DO_ICALL                                                 
    4     7        INIT_FCALL                                               'var_dump'
          8        FETCH_OBJ_IS                                     ~6      !0, 'a'
          9        ISSET_ISEMPTY_PROP_OBJ                           ~7      ~6, 'b'
         10        SEND_VAL                                                 ~7
         11        DO_ICALL                                                 
    5    12        INIT_FCALL                                               'var_dump'
         13        FETCH_OBJ_IS                                     ~9      !0, 'b'
         14        ISSET_ISEMPTY_PROP_OBJ                           ~10     ~9, 'c'
         15        SEND_VAL                                                 ~10
         16        DO_ICALL                                                 
    6    17        INIT_FCALL                                               'var_dump'
         18        FETCH_OBJ_IS                                     ~12     !0, 'd'
         19        ISSET_ISEMPTY_DIM_OBJ                         0  ~13     ~12, 'e'
         20        SEND_VAL                                                 ~13
         21        DO_ICALL                                                 
   20    22      > RETURN                                                   1

Class c:
Function __get:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IDfeo
function name:  __get
number of ops:  12
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        INIT_METHOD_CALL                                         '__isset'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4      > JMPZ                                                     $1, ->9
          5    >   FETCH_OBJ_R                                      ~2      'x'
          6        FETCH_DIM_R                                      ~3      ~2, !0
          7        QM_ASSIGN                                        ~4      ~3
          8      > JMP                                                      ->10
          9    >   QM_ASSIGN                                        ~4      null
         10    > > RETURN                                                   ~4
   14    11*     > RETURN                                                   null

End of function __get

Function __isset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IDfeo
function name:  __isset
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   17     1        FETCH_OBJ_IS                                     ~1      'x'
          2        ISSET_ISEMPTY_DIM_OBJ                         0  ~2      ~1, !0
          3      > RETURN                                                   ~2
   18     4*     > RETURN                                                   null

End of function __isset

End of class c.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.05 ms | 1400 KiB | 15 Q