3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); class a { public function b(&$name) { $name = strtolower($name); } } $reflectionMethod = new ReflectionMethod('a', 'b'); $name = 'Rasmus'; $reflectionMethod->invokeArgs(new a, array($name)); echo $name;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JTt6K
function name:  (null)
number of ops:  18
compiled vars:  !0 = $reflectionMethod, !1 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -1
          2        DO_ICALL                                                 
   11     3        NEW                                              $3      'ReflectionMethod'
          4        SEND_VAL_EX                                              'a'
          5        SEND_VAL_EX                                              'b'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $3
   12     8        ASSIGN                                                   !1, 'Rasmus'
   13     9        INIT_METHOD_CALL                                         !0, 'invokeArgs'
         10        NEW                                              $7      'a'
         11        DO_FCALL                                      0          
         12        SEND_VAR_NO_REF_EX                                       $7
         13        INIT_ARRAY                                       ~9      !1
         14        SEND_VAL_EX                                              ~9
         15        DO_FCALL                                      0          
   14    16        ECHO                                                     !1
         17      > RETURN                                                   1

Class a:
Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JTt6K
function name:  b
number of ops:  6
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'strtolower'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    7     5      > RETURN                                                   null

End of function b

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.59 ms | 1395 KiB | 17 Q