3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Klasse { private function foo(){ print "test"; } } $klasse = new ReflectionClass('Klasse'); $objekt = new Klasse; $methode = $klasse->getMethod('foo'); $methode->invoke($objekt, null);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2S8PE
function name:  (null)
number of ops:  16
compiled vars:  !0 = $klasse, !1 = $objekt, !2 = $methode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $3      'ReflectionClass'
          1        SEND_VAL_EX                                              'Klasse'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    8     4        NEW                                              $6      'Klasse'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $6
   10     7        INIT_METHOD_CALL                                         !0, 'getMethod'
          8        SEND_VAL_EX                                              'foo'
          9        DO_FCALL                                      0  $9      
         10        ASSIGN                                                   !2, $9
   11    11        INIT_METHOD_CALL                                         !2, 'invoke'
         12        SEND_VAR_EX                                              !1
         13        SEND_VAL_EX                                              null
         14        DO_FCALL                                      0          
         15      > RETURN                                                   1

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

End of function foo

End of class Klasse.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.26 ms | 1393 KiB | 13 Q