3v4l.org

run code in 300+ PHP versions simultaneously
<?php $awards = [ "award_year" => ["1999-01", "2010-12"], "award_title_user" => ["2", "tt"], "award_description_user" => ["2", "ddd"] ]; $remappedAwards = array_map(function($year, $title, $description){ return [ "award_year" => $year, "award_title_user" => $title, "award_description_user" => $description ]; }, $awards["award_year"], $awards["award_title_user"], $awards["award_description_user"]); $remappedAwards = array_reverse($remappedAwards); echo "<pre>"; var_dump($remappedAwards); echo "</pre>";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v78Ep
function name:  (null)
number of ops:  22
compiled vars:  !0 = $awards, !1 = $remappedAwards
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'array_map'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fv78Ep%3A8%240'
   14     3        SEND_VAL                                                 ~3
          4        FETCH_DIM_R                                      ~4      !0, 'award_year'
          5        SEND_VAL                                                 ~4
          6        FETCH_DIM_R                                      ~5      !0, 'award_title_user'
          7        SEND_VAL                                                 ~5
          8        FETCH_DIM_R                                      ~6      !0, 'award_description_user'
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                         $7      
    8    11        ASSIGN                                                   !1, $7
   16    12        INIT_FCALL                                               'array_reverse'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $9      
         15        ASSIGN                                                   !1, $9
   18    16        ECHO                                                     '%3Cpre%3E'
   19    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
   20    20        ECHO                                                     '%3C%2Fpre%3E'
         21      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fv78Ep%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v78Ep
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $year, !1 = $title, !2 = $description
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
   10     3        INIT_ARRAY                                       ~3      !0, 'award_year'
   11     4        ADD_ARRAY_ELEMENT                                ~3      !1, 'award_title_user'
   12     5        ADD_ARRAY_ELEMENT                                ~3      !2, 'award_description_user'
          6      > RETURN                                                   ~3
   14     7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fv78Ep%3A8%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.44 ms | 1396 KiB | 19 Q