3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait MakesShitTrait { PRIVATE function doShit() { return 'Salsicha'; } } class Shitter { use MakesShitTrait; public function wtf() { return $this->doShit(); } } $shitter = new Shitter(); echo $shitter->wtf();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eNJcJ
function name:  (null)
number of ops:  8
compiled vars:  !0 = $shitter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_CLASS                                            'shitter'
   20     1        NEW                                              $1      'Shitter'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   22     4        INIT_METHOD_CALL                                         !0, 'wtf'
          5        DO_FCALL                                      0  $4      
          6        ECHO                                                     $4
          7      > RETURN                                                   1

Class MakesShitTrait:
Function doshit:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eNJcJ
function name:  doShit
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   'Salsicha'
    7     1*     > RETURN                                                   null

End of function doshit

End of class MakesShitTrait.

Class Shitter:
Function wtf:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eNJcJ
function name:  wtf
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_METHOD_CALL                                         'doShit'
          1        DO_FCALL                                      0  $0      
          2      > RETURN                                                   $0
   17     3*     > RETURN                                                   null

End of function wtf

End of class Shitter.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.85 ms | 1394 KiB | 13 Q