3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_POST['mytext'] = [ 'foo', 'bar', 'baz', ]; $_POST['mytext2'] = [ 'foo2', 'bar2', 'baz2', ]; $data = array_map(function ($myText, $myText2) { return [ 'mytext' => $myText, 'mytext2' => $myText2, ]; }, $_POST['mytext'], $_POST['mytext2']); print_r($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vE0kZ
function name:  (null)
number of ops:  21
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FETCH_W                      global              $1      '_POST'
          1        ASSIGN_DIM                                               $1, 'mytext'
    4     2        OP_DATA                                                  <array>
    9     3        FETCH_W                      global              $3      '_POST'
          4        ASSIGN_DIM                                               $3, 'mytext2'
   10     5        OP_DATA                                                  <array>
   15     6        INIT_FCALL                                               'array_map'
          7        DECLARE_LAMBDA_FUNCTION                          ~5      [0]
   20     8        SEND_VAL                                                 ~5
          9        FETCH_R                      global              ~6      '_POST'
         10        FETCH_DIM_R                                      ~7      ~6, 'mytext'
         11        SEND_VAL                                                 ~7
         12        FETCH_R                      global              ~8      '_POST'
         13        FETCH_DIM_R                                      ~9      ~8, 'mytext2'
         14        SEND_VAL                                                 ~9
   15    15        DO_ICALL                                         $10     
         16        ASSIGN                                                   !0, $10
   22    17        INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                                 
         20      > 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/vE0kZ
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $myText, !1 = $myText2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   17     2        INIT_ARRAY                                       ~2      !0, 'mytext'
   18     3        ADD_ARRAY_ELEMENT                                ~2      !1, 'mytext2'
          4      > RETURN                                                   ~2
   20     5*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.27 ms | 1000 KiB | 15 Q