3v4l.org

run code in 300+ PHP versions simultaneously
<?php class View { protected array $params = ['name' => ['foo']]; public function __get(string $name) { return $this->params[$name]; } } $obj = new View; $arr = []; var_dump(isset($obj->name), isset($obj->name[0]), isset($arr['name']), isset($arr['name'][0]));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ehXK1
function name:  (null)
number of ops:  17
compiled vars:  !0 = $obj, !1 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $2      'View'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   10     3        ASSIGN                                                   !1, <array>
   11     4        INIT_FCALL                                               'var_dump'
          5        ISSET_ISEMPTY_PROP_OBJ                           ~6      !0, 'name'
          6        SEND_VAL                                                 ~6
          7        FETCH_OBJ_IS                                     ~7      !0, 'name'
          8        ISSET_ISEMPTY_DIM_OBJ                         0  ~8      ~7, 0
          9        SEND_VAL                                                 ~8
         10        ISSET_ISEMPTY_DIM_OBJ                         0  ~9      !1, 'name'
         11        SEND_VAL                                                 ~9
         12        FETCH_DIM_IS                                     ~10     !1, 'name'
         13        ISSET_ISEMPTY_DIM_OBJ                         0  ~11     ~10, 0
         14        SEND_VAL                                                 ~11
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Class View:
Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ehXK1
function name:  __get
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        FETCH_OBJ_R                                      ~1      'params'
          2        FETCH_DIM_R                                      ~2      ~1, !0
          3      > RETURN                                                   ~2
    7     4*     > RETURN                                                   null

End of function __get

End of class View.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.84 ms | 1432 KiB | 14 Q