3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { function byRefFunc(&$byRefArg) { $byRefArg = true; } } $instance = new Test(); $function = new \ReflectionMethod($instance, 'byRefFunc'); $variables = $function->getStaticVariables(); var_dump($variables);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5Jk8S
function name:  (null)
number of ops:  15
compiled vars:  !0 = $instance, !1 = $function, !2 = $variables
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $3      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   10     3        NEW                                              $6      'ReflectionMethod'
          4        SEND_VAR_EX                                              !0
          5        SEND_VAL_EX                                              'byRefFunc'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
   11     8        INIT_METHOD_CALL                                         !1, 'getStaticVariables'
          9        DO_FCALL                                      0  $9      
         10        ASSIGN                                                   !2, $9
   13    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Class Test:
Function byreffunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5Jk8S
function name:  byRefFunc
number of ops:  3
compiled vars:  !0 = $byRefArg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        ASSIGN                                                   !0, <true>
    6     2      > RETURN                                                   null

End of function byreffunc

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.2 ms | 1386 KiB | 15 Q