3v4l.org

run code in 300+ PHP versions simultaneously
<?php function dumpResult(callable $fn, ...$args): void { var_dump($fn(...$args)); } dumpResult(fn($foo) => "Input: $foo", "Test");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SRSVo
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'dumpresult'
          1        DECLARE_LAMBDA_FUNCTION                          ~0      [0]
          2        SEND_VAL                                                 ~0
          3        SEND_VAL                                                 'Test'
          4        DO_FCALL                                      0          
          5      > 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/SRSVo
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1        NOP                                                      
          2        FAST_CONCAT                                      ~1      'Input%3A+', !0
          3      > RETURN                                                   ~1
          4*     > RETURN                                                   null

End of Dynamic Function 0

Function dumpresult:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SRSVo
function name:  dumpResult
number of ops:  10
compiled vars:  !0 = $fn, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_VARIADIC                                    !1      
    5     2        INIT_FCALL                                               'var_dump'
          3        INIT_DYNAMIC_CALL                                        !0
          4        SEND_UNPACK                                              !1
          5        CHECK_UNDEF_ARGS                                         
          6        DO_FCALL                                      1  $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                                 
    6     9      > RETURN                                                   null

End of function dumpresult

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.85 ms | 1439 KiB | 15 Q