3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php (function($param1){ return function(...$param2) use ($param1){ foreach($param2 as $item) { echo "$param1, $item"; } }; })("Hello")("To You", "To Me");
based on Pvvf2
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/uBvH2
function name:  (null)
number of ops:  9
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FuBvH20x7ff5211760be'
  14     1        INIT_DYNAMIC_CALL                                        ~0
         2        SEND_VAL_EX                                              'Hello'
         3        DO_FCALL                                      0  $1      
         4        INIT_DYNAMIC_CALL                                        $1
         5        SEND_VAL_EX                                              'To+You'
         6        SEND_VAL_EX                                              'To+Me'
         7        DO_FCALL                                      0          
         8      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FuBvH20x7ff5211760be:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/uBvH2
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $param1
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   RECV                                             !0      
   5     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FuBvH20x7ff5211760b6'
  12     2      > RETURN                                                   ~1
  14     3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FuBvH20x7ff5211760be

Function %00%7Bclosure%7D%2Fin%2FuBvH20x7ff5211760b6:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
Jump found. Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
Jump found. Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 10
Jump found. Position 1 = -2
Branch analysis from position: 10
filename:       /in/uBvH2
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $param2, !1 = $param1, !2 = $item
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   5     0  E >   RECV_VARIADIC                                    !0      
         1        FETCH_R                      static              $3      'param1'
         2        ASSIGN                                                   !1, $3
   7     3      > FE_RESET_R                                       $5      !0, ->10
         4    > > FE_FETCH_R                                               $5, !2, ->10
   9     5    >   ROPE_INIT                                     3  ~7      !1
         6        ROPE_ADD                                      1  ~7      ~7, '%2C+'
         7        ROPE_END                                      2  ~6      ~7, !2
         8        ECHO                                                     ~6
         9      > JMP                                                      ->4
        10    >   FE_FREE                                                  $5
  12    11      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FuBvH20x7ff5211760b6

Generated using Vulcan Logic Dumper, using php 7.3.0