3v4l.org

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

Class MySweetAssClass:
Function my_private_method:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BC2OH
function name:  my_private_method
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ECHO                                                     'show+me+on+the+doll+where+the+bad+language+touched+you'
    7     1      > RETURN                                                   null

End of function my_private_method

End of class MySweetAssClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.38 ms | 1398 KiB | 13 Q