3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(callable $bar = null) { } foo(null); 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/UIjFM
function name:  (null)
number of ops:  27
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'foo'
          1        SEND_VAL                                                 null
          2        DO_FCALL                                      0          
    8     3        INIT_FCALL                                               'foo'
          4        DECLARE_LAMBDA_FUNCTION                          ~1      [0]
          5        SEND_VAL                                                 ~1
          6        DO_FCALL                                      0          
    9     7        INIT_FCALL                                               'foo'
          8        SEND_VAL                                                 'strpos'
          9        DO_FCALL                                      0          
   10    10        INIT_FCALL                                               'foo'
         11        SEND_VAL                                                 'foo'
         12        DO_FCALL                                      0          
   11    13        INIT_FCALL                                               'foo'
         14        NEW                                              $5      'SplFixedArray'
         15        DO_FCALL                                      0          
         16        INIT_ARRAY                                       ~7      $5
         17        ADD_ARRAY_ELEMENT                                ~7      'fromArray'
         18        SEND_VAL                                                 ~7
         19        DO_FCALL                                      0          
   12    20        INIT_FCALL                                               'foo'
         21        SEND_VAL                                                 <array>
         22        DO_FCALL                                      0          
   13    23        INIT_FCALL                                               'foo'
         24        SEND_VAL                                                 'SplFixedArray%3A%3AfromArray'
         25        DO_FCALL                                      0          
         26      > 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/UIjFM
function name:  {closure}
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     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/UIjFM
function name:  foo
number of ops:  2
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      null
    5     1      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
131.12 ms | 1453 KiB | 20 Q