3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); class a { private $cache = 5; public function getCache() { return $this->cache; } } class b extends a { private $cache; public function setCache($value) { $this->cache = $value; } } $d = new b(); $d->setCache(2); echo $d->getCache();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XaAmh
function name:  (null)
number of ops:  13
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
   24     3        NEW                                              $2      'b'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   25     6        INIT_METHOD_CALL                                         !0, 'setCache'
          7        SEND_VAL_EX                                              2
          8        DO_FCALL                                      0          
   26     9        INIT_METHOD_CALL                                         !0, 'getCache'
         10        DO_FCALL                                      0  $6      
         11        ECHO                                                     $6
         12      > RETURN                                                   1

Class a:
Function getcache:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XaAmh
function name:  getCache
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_OBJ_R                                      ~0      'cache'
          1      > RETURN                                                   ~0
   11     2*     > RETURN                                                   null

End of function getcache

End of class a.

Class b:
Function setcache:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XaAmh
function name:  setCache
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   19     1        ASSIGN_OBJ                                               'cache'
          2        OP_DATA                                                  !0
   20     3      > RETURN                                                   null

End of function setcache

Function getcache:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XaAmh
function name:  getCache
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_OBJ_R                                      ~0      'cache'
          1      > RETURN                                                   ~0
   11     2*     > RETURN                                                   null

End of function getcache

End of class b.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.23 ms | 1396 KiB | 15 Q