3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected function getBar() { return 'bar'; } } $method = new ReflectionMethod('Foo', 'getBar'); $method->setAccessible(true); echo $method->invoke(new Foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ipfu5
function name:  (null)
number of ops:  15
compiled vars:  !0 = $method
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $1      'ReflectionMethod'
          1        SEND_VAL_EX                                              'Foo'
          2        SEND_VAL_EX                                              'getBar'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
    9     5        INIT_METHOD_CALL                                         !0, 'setAccessible'
          6        SEND_VAL_EX                                              <true>
          7        DO_FCALL                                      0          
   11     8        INIT_METHOD_CALL                                         !0, 'invoke'
          9        NEW                                              $5      'Foo'
         10        DO_FCALL                                      0          
         11        SEND_VAR_NO_REF_EX                                       $5
         12        DO_FCALL                                      0  $7      
         13        ECHO                                                     $7
         14      > RETURN                                                   1

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

End of function getbar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.24 ms | 1393 KiB | 13 Q