3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Piwik\Plugins\Test;class Xyz { public function tester() { } public function hasImplementedEvent($method) { $method = new \ReflectionMethod($this, $method); $declaringClass = $method->getDeclaringClass(); var_dump($declaringClass->name); }}$x = new Xyz();$y = $x->hasImplementedEvent('tester');var_dump($y);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Kn0uB
function name:  (null)
number of ops:  11
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'Piwik%5CPlugins%5CTest%5CXyz'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
          3        INIT_METHOD_CALL                                         !0, 'hasImplementedEvent'
          4        SEND_VAL_EX                                              'tester'
          5        DO_FCALL                                      0  $5      
          6        ASSIGN                                                   !1, $5
          7        INIT_NS_FCALL_BY_NAME                                    'Piwik%5CPlugins%5CTest%5Cvar_dump'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Class Piwik\Plugins\Test\Xyz:
Function tester:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Kn0uB
function name:  tester
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E > > RETURN                                                   null

End of function tester

Function hasimplementedevent:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Kn0uB
function name:  hasImplementedEvent
number of ops:  16
compiled vars:  !0 = $method, !1 = $declaringClass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1        NEW                                              $2      'ReflectionMethod'
          2        FETCH_THIS                                       $3      
          3        SEND_VAR_EX                                              $3
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $2
          7        INIT_METHOD_CALL                                         !0, 'getDeclaringClass'
          8        DO_FCALL                                      0  $6      
          9        ASSIGN                                                   !1, $6
         10        INIT_NS_FCALL_BY_NAME                                    'Piwik%5CPlugins%5CTest%5Cvar_dump'
         11        CHECK_FUNC_ARG                                           
         12        FETCH_OBJ_FUNC_ARG                               $8      !1, 'name'
         13        SEND_FUNC_ARG                                            $8
         14        DO_FCALL                                      0          
         15      > RETURN                                                   null

End of function hasimplementedevent

End of class Piwik\Plugins\Test\Xyz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.52 ms | 941 KiB | 16 Q