3v4l.org

run code in 300+ PHP versions simultaneously
<?php $taxonomies = [ 'genres' => [ 'label' => 'Genres', 'value' => 'genres' ], 'somethingelse' => [ 'label' => 'foo', 'value' => 'bar' ], 'movie_tags' => [ 'label' => 'Movie Tags', 'value' => 'movie_tags' ], 'portfolio_category' => [ 'label' => 'Portfolio Categories', 'value' => 'portfolio_category' ] ]; $postTypes = [ 'movies' => ['genres', 'movie_tags'], 'portfolio' => ['portfolio_category'], ]; var_export( array_map( fn($taxKeys) => array_map( fn($taxKey) => $taxonomies[$taxKey], $taxKeys ), $postTypes ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dhfIg
function name:  (null)
number of ops:  13
compiled vars:  !0 = $taxonomies, !1 = $postTypes, !2 = $taxKey
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   22     1        ASSIGN                                                   !1, <array>
   27     2        INIT_FCALL                                               'var_export'
   28     3        INIT_FCALL                                               'array_map'
   29     4        DECLARE_LAMBDA_FUNCTION                          ~5      [0]
          5        BIND_LEXICAL                                             ~5, !0
          6        BIND_LEXICAL                                             ~5, !2
   32     7        SEND_VAL                                                 ~5
   33     8        SEND_VAR                                                 !1
   28     9        DO_ICALL                                         $6      
   33    10        SEND_VAR                                                 $6
   27    11        DO_ICALL                                                 
   35    12      > 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/dhfIg
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $taxKeys, !1 = $taxonomies, !2 = $taxKey
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        BIND_STATIC                                              !2
          3        INIT_FCALL                                               'array_map'
   30     4        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
          5        BIND_LEXICAL                                             ~3, !1
          6        SEND_VAL                                                 ~3
   31     7        SEND_VAR                                                 !0
   29     8        DO_ICALL                                         $4      
   31     9      > RETURN                                                   $4
   32    10*     > RETURN                                                   null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dhfIg
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $taxKey, !1 = $taxonomies
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        FETCH_DIM_R                                      ~2      !1, !0
          3      > RETURN                                                   ~2
          4*     > RETURN                                                   null

End of Dynamic Function 0

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.42 ms | 1000 KiB | 15 Q