3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Home { protected $name = 'Fredrik'; private function getName() { return $this->name; } } class Say { use Home; } $say = new Say; echo $say->getName();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gH3it
function name:  (null)
number of ops:  8
compiled vars:  !0 = $say
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   DECLARE_CLASS                                            'say'
   15     1        NEW                                              $1      'Say'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   16     4        INIT_METHOD_CALL                                         !0, 'getName'
          5        DO_FCALL                                      0  $4      
          6        ECHO                                                     $4
          7      > RETURN                                                   1

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

End of function getname

End of class Home.

Class Say: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.43 ms | 1393 KiB | 13 Q