3v4l.org

run code in 500+ PHP versions simultaneously
<?php $data = [ 'id' => [1, 2, 3], 'title' => ['Первый', 'Впервые мы смогли', 'Перваши'], 'date' => ['2020-11-05 12:51:02', '2020-11-05 15:26:09', '2020-11-03 15:27:26'], 'rating' => [1000, 1212, 111111], 'size' => ['1000 MB', '441 GB', '132 mb'], 'views' => [56252, 1111, 1231] ]; $rows = array_map( fn(...$vals) => array_combine(array_keys($data), $vals), ...array_values($data)); foreach ($rows as $row) { echo json_encode($row, JSON_UNESCAPED_UNICODE), PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 21
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 21
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/vqQDK
function name:  (null)
number of ops:  23
compiled vars:  !0 = $data, !1 = $rows, !2 = $row
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   13     1        INIT_FCALL                                                   'array_map'
   14     2        DECLARE_LAMBDA_FUNCTION                              ~4      [0]
          3        BIND_LEXICAL                                                 ~4, !0
          4        SEND_VAL                                                     ~4
   15     5        INIT_FCALL                                                   'array_values'
          6        SEND_VAR                                                     !0
          7        DO_ICALL                                             $5      
          8        SEND_UNPACK                                                  $5
          9        CHECK_UNDEF_ARGS                                             
   13    10        DO_ICALL                                             $6      
         11        ASSIGN                                                       !1, $6
   17    12      > FE_RESET_R                                           $8      !1, ->21
         13    > > FE_FETCH_R                                                   $8, !2, ->21
   18    14    >   INIT_FCALL                                                   'json_encode'
         15        SEND_VAR                                                     !2
         16        SEND_VAL                                                     256
         17        DO_ICALL                                             $9      
         18        ECHO                                                         $9
         19        ECHO                                                         '%0A'
   17    20      > JMP                                                          ->13
         21    >   FE_FREE                                                      $8
   19    22      > 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/vqQDK
function name:  {closure:/in/vqQDK:14}
number of ops:  11
compiled vars:  !0 = $vals, !1 = $data
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   RECV_VARIADIC                                        !0      
          1        BIND_STATIC                                                  !1
          2        INIT_FCALL                                                   'array_combine'
          3        INIT_FCALL                                                   'array_keys'
          4        SEND_VAR                                                     !1
          5        DO_ICALL                                             $2      
          6        SEND_VAR                                                     $2
          7        SEND_VAR                                                     !0
          8        DO_ICALL                                             $3      
          9      > RETURN                                                       $3
         10*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
215.32 ms | 1609 KiB | 13 Q