3v4l.org

run code in 300+ PHP versions simultaneously
<?php function sfunc($a, ...$funcs){ echo '<details> <summary>'. $a . '</summary>' . PHP_EOL; foreach ($funcs as $func) $func(); unset($func); echo '</details>' . PHP_EOL; } $fun = function (){ echo "123"; }; $summary = "test"; sfunc($summary, $fun);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tS8DX
function name:  (null)
number of ops:  8
compiled vars:  !0 = $fun, !1 = $summary
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          1        ASSIGN                                                   !0, ~2
   15     2        ASSIGN                                                   !1, 'test'
   17     3        INIT_FCALL                                               'sfunc'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0          
          7      > 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/tS8DX
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ECHO                                                     '123'
   13     1      > RETURN                                                   null

End of Dynamic Function 0

Function sfunc:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/tS8DX
function name:  sfunc
number of ops:  15
compiled vars:  !0 = $a, !1 = $funcs, !2 = $func
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_VARIADIC                                    !1      
    4     2        CONCAT                                           ~3      '%3Cdetails%3E+%3Csummary%3E', !0
          3        CONCAT                                           ~4      ~3, '%3C%2Fsummary%3E'
          4        CONCAT                                           ~5      ~4, '%0A'
          5        ECHO                                                     ~5
    5     6      > FE_RESET_R                                       $6      !1, ->11
          7    > > FE_FETCH_R                                               $6, !2, ->11
    6     8    >   INIT_DYNAMIC_CALL                                        !2
          9        DO_FCALL                                      0          
    5    10      > JMP                                                      ->7
         11    >   FE_FREE                                                  $6
    7    12        UNSET_CV                                                 !2
    8    13        ECHO                                                     '%3C%2Fdetails%3E%0A'
    9    14      > RETURN                                                   null

End of function sfunc

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.91 ms | 1001 KiB | 14 Q