3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar() { } public static function barS() { } } function x() { } print_r(Closure::fromCallable([new Foo(), 'bar'])); print_r(Closure::fromCallable([Foo::class, 'barS'])); print_r(x(...));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s8HvF
function name:  (null)
number of ops:  22
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_STATIC_METHOD_CALL                                  'Closure', 'fromCallable'
          2        NEW                                              $0      'Foo'
          3        DO_FCALL                                      0          
          4        INIT_ARRAY                                       ~2      $0
          5        ADD_ARRAY_ELEMENT                                ~2      'bar'
          6        SEND_VAL                                                 ~2
          7        DO_FCALL                                      0  $3      
          8        SEND_VAR                                                 $3
          9        DO_ICALL                                                 
   15    10        INIT_FCALL                                               'print_r'
         11        INIT_STATIC_METHOD_CALL                                  'Closure', 'fromCallable'
         12        SEND_VAL                                                 <array>
         13        DO_FCALL                                      0  $5      
         14        SEND_VAR                                                 $5
         15        DO_ICALL                                                 
   16    16        INIT_FCALL                                               'print_r'
         17        INIT_FCALL                                               'x'
         18        ZEND_CALLABLE_CONVERT                            ~7      
         19        SEND_VAL                                                 ~7
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

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

End of function x

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

End of function bar

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

End of function bars

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.04 ms | 1001 KiB | 15 Q