3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Name\Space; class Foo { public static function bar() { } } $reflection = new \ReflectionMethod('Name\\Space\\Foo', 'bar'); $closure = $reflection->getClosure(null); $reflection3 = new \ReflectionFunction($closure); var_dump($closure, $reflection, $reflection2, $reflection3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MYoKI
function name:  (null)
number of ops:  20
compiled vars:  !0 = $reflection, !1 = $closure, !2 = $reflection3, !3 = $reflection2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $4      'ReflectionMethod'
          1        SEND_VAL_EX                                              'Name%5CSpace%5CFoo'
          2        SEND_VAL_EX                                              'bar'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $4
   14     5        INIT_METHOD_CALL                                         !0, 'getClosure'
          6        SEND_VAL_EX                                              null
          7        DO_FCALL                                      0  $7      
          8        ASSIGN                                                   !1, $7
   15     9        NEW                                              $9      'ReflectionFunction'
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !2, $9
   17    13        INIT_NS_FCALL_BY_NAME                                    'Name%5CSpace%5Cvar_dump'
         14        SEND_VAR_EX                                              !1
         15        SEND_VAR_EX                                              !0
         16        SEND_VAR_EX                                              !3
         17        SEND_VAR_EX                                              !2
         18        DO_FCALL                                      0          
         19      > RETURN                                                   1

Class Name\Space\Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MYoKI
function name:  bar
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   null

End of function bar

End of class Name\Space\Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.65 ms | 1395 KiB | 15 Q