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'); } } $b = new B(); var_dump($b->hasAVar()); var_dump($b->hasBVar());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FcJAE
function name:  (null)
number of ops:  14
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $1      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    9     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'hasAVar'
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                                 
   10     8        INIT_FCALL                                               'var_dump'
          9        INIT_METHOD_CALL                                         !0, 'hasBVar'
         10        DO_FCALL                                      0  $6      
         11        SEND_VAR                                                 $6
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

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