3v4l.org

run code in 300+ PHP versions simultaneously
<?php class dog { public $Name; protected function getName() { return $this->Name; } } class poodle extends dog { public function bark() { print "'Woof', says " . $this->getName(); } } $poppy = new poodle; $poppy->Name = "Poppy"; $poppy->bark(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QkmRu
function name:  (null)
number of ops:  8
compiled vars:  !0 = $poppy
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'poodle'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        ASSIGN_OBJ                                               !0, 'Name'
          4        OP_DATA                                                  'Poppy'
   17     5        INIT_METHOD_CALL                                         !0, 'bark'
          6        DO_FCALL                                      0          
   18     7      > RETURN                                                   1

Class dog:
Function getname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QkmRu
function name:  getName
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_OBJ_R                                      ~0      'Name'
          1      > RETURN                                                   ~0
    6     2*     > RETURN                                                   null

End of function getname

End of class dog.

Class poodle:
Function bark:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QkmRu
function name:  bark
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_METHOD_CALL                                         'getName'
          1        DO_FCALL                                      0  $0      
          2        CONCAT                                           ~1      '%27Woof%27%2C+says+', $0
          3        ECHO                                                     ~1
   12     4      > RETURN                                                   null

End of function bark

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

End of function getname

End of class poodle.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
190.02 ms | 1395 KiB | 13 Q