3v4l.org

run code in 500+ PHP versions simultaneously
<?php function foo(callable $bar) { } foo(function() {}); foo('strpos'); foo('foo'); foo(array(new SplFixedArray(), 'fromArray')); foo(array('SplFixedArray', 'fromArray')); foo('SplFixedArray::fromArray');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mmPm0
function name:  (null)
number of ops:  24
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                                   'foo'
          1        DECLARE_LAMBDA_FUNCTION                              ~0      [0]
          2        SEND_VAL                                                     ~0
          3        DO_FCALL                                          0          
    8     4        INIT_FCALL                                                   'foo'
          5        SEND_VAL                                                     'strpos'
          6        DO_FCALL                                          0          
    9     7        INIT_FCALL                                                   'foo'
          8        SEND_VAL                                                     'foo'
          9        DO_FCALL                                          0          
   10    10        INIT_FCALL                                                   'foo'
         11        NEW                                                  $4      'SplFixedArray'
         12        DO_FCALL                                          0          
         13        INIT_ARRAY                                           ~6      $4
         14        ADD_ARRAY_ELEMENT                                    ~6      'fromArray'
         15        SEND_VAL                                                     ~6
         16        DO_FCALL                                          0          
   11    17        INIT_FCALL                                                   'foo'
         18        SEND_VAL                                                     <array>
         19        DO_FCALL                                          0          
   12    20        INIT_FCALL                                                   'foo'
         21        SEND_VAL                                                     'SplFixedArray%3A%3AfromArray'
         22        DO_FCALL                                          0          
         23      > RETURN                                                       1


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

End of Dynamic Function 0

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

End of function foo

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.78 ms | 2560 KiB | 19 Q