3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait privateInfo { private function privateFunc() { echo "shamoan"; } } class ezcReflectionMethod { use privateInfo; public function jump() { $this->privateFunc(); } } $obj = new ezcReflectionMethod; $obj->jump(); $obj->privateFunc();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EaFaj
function name:  (null)
number of ops:  9
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_CLASS                                            'ezcreflectionmethod'
   17     1        NEW                                              $1      'ezcReflectionMethod'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   18     4        INIT_METHOD_CALL                                         !0, 'jump'
          5        DO_FCALL                                      0          
   19     6        INIT_METHOD_CALL                                         !0, 'privateFunc'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Class privateInfo:
Function privatefunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EaFaj
function name:  privateFunc
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'shamoan'
    6     1      > RETURN                                                   null

End of function privatefunc

End of class privateInfo.

Class ezcReflectionMethod:
Function jump:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EaFaj
function name:  jump
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_METHOD_CALL                                         'privateFunc'
          1        DO_FCALL                                      0          
   14     2      > RETURN                                                   null

End of function jump

End of class ezcReflectionMethod.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.35 ms | 1393 KiB | 13 Q