3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'content_type' => [ 'story', 'delhi', 'tez' ], 'type' => [ 'video_id', 'subcategory', 'story_id' ], 'fetch_id' => [ 32, 32, 2 ], 'order' => [ 6, 4, 5 ], 'label' => [ 'dsfs fdsf dsf sdf', 'dfsdfs', 'sdfsdfsd' ], 'link' => [ 'fsd fsdf sdf', 'fsdfsdfdsf', 'fsdfdsfds' ], 'record' => [ 10, 8, 12 ] ]; asort($array['order']); var_export( array_map( fn($row) => array_replace( $array['order'], $row ), $array ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RuIqg
function name:  (null)
number of ops:  15
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   41     1        INIT_FCALL                                               'asort'
          2        FETCH_DIM_W                                      $2      !0, 'order'
          3        SEND_REF                                                 $2
          4        DO_ICALL                                                 
   42     5        INIT_FCALL                                               'var_export'
   43     6        INIT_FCALL                                               'array_map'
   44     7        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
          8        BIND_LEXICAL                                             ~4, !0
   47     9        SEND_VAL                                                 ~4
   48    10        SEND_VAR                                                 !0
   43    11        DO_ICALL                                         $5      
   48    12        SEND_VAR                                                 $5
   42    13        DO_ICALL                                                 
   50    14      > 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/RuIqg
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $row, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   44     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        INIT_FCALL                                               'array_replace'
   45     3        FETCH_DIM_R                                      ~2      !1, 'order'
          4        SEND_VAL                                                 ~2
   46     5        SEND_VAR                                                 !0
   44     6        DO_ICALL                                         $3      
   46     7      > RETURN                                                   $3
   47     8*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.63 ms | 1013 KiB | 17 Q