3v4l.org

run code in 300+ PHP versions simultaneously
<?php class x { public function method() {} } $o = new x; $r = new ReflectionMethod($o, 'method'); $c = Closure::bind($r->getClosure($o), new stdClass());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aMDr3
function name:  (null)
number of ops:  19
compiled vars:  !0 = $o, !1 = $r, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'x'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    4     3        NEW                                              $6      'ReflectionMethod'
          4        SEND_VAR_EX                                              !0
          5        SEND_VAL_EX                                              'method'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
    5     8        INIT_STATIC_METHOD_CALL                                  'Closure', 'bind'
          9        INIT_METHOD_CALL                                         !1, 'getClosure'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0  $9      
         12        SEND_VAR                                                 $9
         13        NEW                                              $10     'stdClass'
         14        DO_FCALL                                      0          
         15        SEND_VAR                                                 $10
         16        DO_FCALL                                      0  $12     
         17        ASSIGN                                                   !2, $12
         18      > RETURN                                                   1

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

End of function method

End of class x.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.29 ms | 1385 KiB | 13 Q