3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $avar = true; public function __isset($varname) { var_dump('__isset called'); return true; } } class B extends A { public function hasAVar(){ return property_exists($this, 'avar'); } public function hasBVar(){ return property_exists($this, 'bvar'); } public function issetVars($property) {return isset($this->{$property}); } } $b = new B(); var_dump($b->issetVars('avar')); var_dump($b->issetVars('bvar'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o7mHe
function name:  (null)
number of ops:  16
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   10     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'issetVars'
          5        SEND_VAL_EX                                              'avar'
          6        DO_FCALL                                      0  $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
   11     9        INIT_FCALL                                               'var_dump'
         10        INIT_METHOD_CALL                                         !0, 'issetVars'
         11        SEND_VAL_EX                                              'bvar'
         12        DO_FCALL                                      0  $6      
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Class A:
Function __isset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o7mHe
function name:  __isset
number of ops:  6
compiled vars:  !0 = $varname
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'var_dump'
          2        SEND_VAL                                                 '__isset+called'
          3        DO_ICALL                                                 
          4      > RETURN                                                   <true>
          5*     > RETURN                                                   null

End of function __isset

End of class A.

Class B:
Function hasavar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o7mHe
function name:  hasAVar
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'property_exists'
          1        FETCH_THIS                                       ~0      
          2        SEND_VAL                                                 ~0
          3        SEND_VAL                                                 'avar'
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
          6*     > RETURN                                                   null

End of function hasavar

Function hasbvar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o7mHe
function name:  hasBVar
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'property_exists'
          1        FETCH_THIS                                       ~0      
          2        SEND_VAL                                                 ~0
          3        SEND_VAL                                                 'bvar'
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
          6*     > RETURN                                                   null

End of function hasbvar

Function issetvars:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o7mHe
function name:  issetVars
number of ops:  4
compiled vars:  !0 = $property
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        ISSET_ISEMPTY_PROP_OBJ                           ~1      !0
          2      > RETURN                                                   ~1
          3*     > RETURN                                                   null

End of function issetvars

Function __isset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o7mHe
function name:  __isset
number of ops:  6
compiled vars:  !0 = $varname
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'var_dump'
          2        SEND_VAL                                                 '__isset+called'
          3        DO_ICALL                                                 
          4      > RETURN                                                   <true>
          5*     > RETURN                                                   null

End of function __isset

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.72 ms | 1400 KiB | 17 Q