3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Pizza { private $size; public function __construct() { $this->size = 'large'; } } class PanPizza extends Pizza { private $size; public function getDefaultSize() { return $this->size; } } $pizza = new PanPizza; var_dump($pizza->getDefaultSize());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4OR6u
function name:  (null)
number of ops:  9
compiled vars:  !0 = $pizza
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $1      'PanPizza'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   23     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'getDefaultSize'
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class Pizza:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4OR6u
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN_OBJ                                               'size'
          1        OP_DATA                                                  'large'
    9     2      > RETURN                                                   null

End of function __construct

End of class Pizza.

Class PanPizza:
Function getdefaultsize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4OR6u
function name:  getDefaultSize
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   FETCH_OBJ_R                                      ~0      'size'
          1      > RETURN                                                   ~0
   19     2*     > RETURN                                                   null

End of function getdefaultsize

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4OR6u
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN_OBJ                                               'size'
          1        OP_DATA                                                  'large'
    9     2      > RETURN                                                   null

End of function __construct

End of class PanPizza.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.15 ms | 1396 KiB | 15 Q