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); echo $method->invoke(new MySweetAssClass); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ue98T
function name:  (null)
number of ops:  15
compiled vars:  !0 = $method
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $1      'ReflectionMethod'
          1        SEND_VAL_EX                                              'MySweetAssClass'
          2        SEND_VAL_EX                                              'my_private_method'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   11     5        INIT_METHOD_CALL                                         !0, 'setAccessible'
          6        SEND_VAL_EX                                              <true>
          7        DO_FCALL                                      0          
   12     8        INIT_METHOD_CALL                                         !0, 'invoke'
          9        NEW                                              $5      'MySweetAssClass'
         10        DO_FCALL                                      0          
         11        SEND_VAR_NO_REF_EX                                       $5
         12        DO_FCALL                                      0  $7      
         13        ECHO                                                     $7
   13    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/ue98T
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:
148.56 ms | 1394 KiB | 13 Q