3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(callable $test) { var_dump($test); } test(function () {}); test('rand'); test(create_function('', '')); test([new SplFixedArray, 'count']);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nekRR
function name:  (null)
number of ops:  22
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'test'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FnekRR%3A7%240'
          2        SEND_VAL                                                 ~0
          3        DO_FCALL                                      0          
    8     4        INIT_FCALL                                               'test'
          5        SEND_VAL                                                 'rand'
          6        DO_FCALL                                      0          
    9     7        INIT_FCALL                                               'test'
          8        INIT_FCALL_BY_NAME                                       'create_function'
          9        SEND_VAL_EX                                              ''
         10        SEND_VAL_EX                                              ''
         11        DO_FCALL                                      0  $3      
         12        SEND_VAR                                                 $3
         13        DO_FCALL                                      0          
   10    14        INIT_FCALL                                               'test'
         15        NEW                                              $5      'SplFixedArray'
         16        DO_FCALL                                      0          
         17        INIT_ARRAY                                       ~7      $5
         18        ADD_ARRAY_ELEMENT                                ~7      'count'
         19        SEND_VAL                                                 ~7
         20        DO_FCALL                                      0          
         21      > RETURN                                                   1

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

End of function test

Function %00%7Bclosure%7D%2Fin%2FnekRR%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nekRR
function name:  {closure}
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FnekRR%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.8 ms | 1399 KiB | 22 Q