3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { public function xAction(){ return true; } } $closure = function(){ return true; }; $controller = [new MyClass, 'xAction']; var_dump(new ReflectionFunction($controller));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L3v1e
function name:  (null)
number of ops:  14
compiled vars:  !0 = $closure, !1 = $controller
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FL3v1e%3A9%240'
          1        ASSIGN                                                   !0, ~2
   13     2        NEW                                              $4      'MyClass'
          3        DO_FCALL                                      0          
          4        INIT_ARRAY                                       ~6      $4
          5        ADD_ARRAY_ELEMENT                                ~6      'xAction'
          6        ASSIGN                                                   !1, ~6
   14     7        INIT_FCALL                                               'var_dump'
          8        NEW                                              $8      'ReflectionFunction'
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0          
         11        SEND_VAR                                                 $8
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FL3v1e%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L3v1e
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   <true>
   11     1*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FL3v1e%3A9%240

Class MyClass:
Function xaction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L3v1e
function name:  xAction
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   <true>
    6     1*     > RETURN                                                   null

End of function xaction

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.26 ms | 1395 KiB | 15 Q