3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $avar; 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->hasAVar()); var_dump($b->hasBVar()); 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/nr2cc
function name:  (null)
number of ops:  26
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, 'hasAVar'
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                                 
   11     8        INIT_FCALL                                               'var_dump'
          9        INIT_METHOD_CALL                                         !0, 'hasBVar'
         10        DO_FCALL                                      0  $6      
         11        SEND_VAR                                                 $6
         12        DO_ICALL                                                 
   12    13        INIT_FCALL                                               'var_dump'
         14        INIT_METHOD_CALL                                         !0, 'issetVars'
         15        SEND_VAL_EX                                              'avar'
         16        DO_FCALL                                      0  $8      
         17        SEND_VAR                                                 $8
         18        DO_ICALL                                                 
   13    19        INIT_FCALL                                               'var_dump'
         20        INIT_METHOD_CALL                                         !0, 'issetVars'
         21        SEND_VAL_EX                                              'bvar'
         22        DO_FCALL                                      0  $10     
         23        SEND_VAR                                                 $10
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Class A:
Function __isset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nr2cc
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/nr2cc
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/nr2cc
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/nr2cc
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/nr2cc
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:
165.19 ms | 1400 KiB | 17 Q