3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Piwik\Plugins\Test; class Xyz extends \ ArrayObject { public function tester() { } public function hasImplementedEvent($method) { $method = new \ReflectionMethod($this, $method); $declaringClass = $method->getDeclaringClass(); return 0 === strpos($declaringClass->name, 'Piwik\Plugins'); }}$x = new Xyz(array());$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/sI40J
function name:  (null)
number of ops:  13
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_CLASS                                            'piwik%5Cplugins%5Ctest%5Cxyz', '%C2%A0arrayobject'
   10     1        NEW                                              $2      'Piwik%5CPlugins%5CTest%5CXyz'
          2        SEND_VAL_EX                                              <array>
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
          5        INIT_METHOD_CALL                                         !0, 'hasImplementedEvent'
          6        SEND_VAL_EX                                              'tester'
          7        DO_FCALL                                      0  $5      
          8        ASSIGN                                                   !1, $5
          9        INIT_NS_FCALL_BY_NAME                                    'Piwik%5CPlugins%5CTest%5Cvar_dump'
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0          
         12      > 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/sI40J
function name:  tester
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     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/sI40J
function name:  hasImplementedEvent
number of ops:  19
compiled vars:  !0 = $method, !1 = $declaringClass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     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
    9     7        INIT_METHOD_CALL                                         !0, 'getDeclaringClass'
          8        DO_FCALL                                      0  $6      
          9        ASSIGN                                                   !1, $6
   10    10        INIT_NS_FCALL_BY_NAME                                    'Piwik%5CPlugins%5CTest%5Cstrpos'
         11        CHECK_FUNC_ARG                                           
         12        FETCH_OBJ_FUNC_ARG                               $8      !1, 'name'
         13        SEND_FUNC_ARG                                            $8
         14        SEND_VAL_EX                                              'Piwik%5CPlugins'
         15        DO_FCALL                                      0  $9      
         16        IS_IDENTICAL                                     ~10     $9, 0
         17      > RETURN                                                   ~10
         18*     > RETURN                                                   null

End of function hasimplementedevent

End of class Piwik\Plugins\Test\Xyz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.27 ms | 1400 KiB | 17 Q