3v4l.org

run code in 500+ PHP versions simultaneously
<?php trait AccessibleProperties { public function __isset($property) { return property_exists($this, $property); } public function __get($property) { if (property_exists($this, $property)) { return $this->$property; } } } class Fooba { use AccessibleProperties; protected $a = 'Some value'; } $foo = new Fooba; var_dump($foo->a); var_dump(isset($foo->a));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0jmp1
function name:  (null)
number of ops:  13
compiled vars:  !0 = $foo
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   18     0  E >   DECLARE_CLASS                                                'fooba'
   24     1        NEW                                                  $1      'Fooba'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $1
   25     4        INIT_FCALL                                                   'var_dump'
          5        FETCH_OBJ_R                                          ~4      !0, 'a'
          6        SEND_VAL                                                     ~4
          7        DO_ICALL                                                     
   26     8        INIT_FCALL                                                   'var_dump'
          9        ISSET_ISEMPTY_PROP_OBJ                               ~6      !0, 'a'
         10        SEND_VAL                                                     ~6
         11        DO_ICALL                                                     
         12      > RETURN                                                       1

Class AccessibleProperties:
Function __isset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0jmp1
function name:  __isset
number of ops:  5
compiled vars:  !0 = $property
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
    7     1        FETCH_THIS                                           ~1      
          2        FRAMELESS_ICALL_2                property_exists      ~2      ~1, !0
          3      > RETURN                                                       ~2
    8     4*     > RETURN                                                       null

End of function __isset

Function __get:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0jmp1
function name:  __get
number of ops:  7
compiled vars:  !0 = $property
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   RECV                                                 !0      
   12     1        FETCH_THIS                                           ~1      
          2        FRAMELESS_ICALL_2                property_exists      ~2      ~1, !0
          3      > JMPZ                                                         ~2, ->6
   13     4    >   FETCH_OBJ_R                                          ~3      !0
          5      > RETURN                                                       ~3
   15     6    > > RETURN                                                       null

End of function __get

End of class AccessibleProperties.

Class Fooba: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.77 ms | 3064 KiB | 14 Q