3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array ( "1" => array ( "0" => "16/03/2018", "1" => "Friday", "2" => "21.00", "3" => "Friendly Match", "4" => "Italy vs France", "5" => "Truesports HD", ), "2" => array ( "0" => "17/03/2018", "1" => "Saturday", "2" => "15.30", "3" => "Friendly Match", "4" => "Italy vs Pakistan", "5" => "Truesports HD", ), "3" => array ( "0" => "17/03/2018", "1" => "Saturday", "2" => "19.00", "3" => "Friendly Match", "4" => "Spain vs USA", "5" => "Truesports" ) ); $array_keys= array("date","day","time","type","value","tv"); $newArray=array(); foreach($array as $subArr){ $newArray[] = array_combine($array_keys,$subArr); } //print_r($newArray); echo json_encode($newArray, JSON_PRETTY_PRINT);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 12
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/YfRbA
function name:  (null)
number of ops:  19
compiled vars:  !0 = $array, !1 = $array_keys, !2 = $newArray, !3 = $subArr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   34     1        ASSIGN                                                   !1, <array>
   35     2        ASSIGN                                                   !2, <array>
   36     3      > FE_RESET_R                                       $7      !0, ->12
          4    > > FE_FETCH_R                                               $7, !3, ->12
   37     5    >   INIT_FCALL                                               'array_combine'
          6        SEND_VAR                                                 !1
          7        SEND_VAR                                                 !3
          8        DO_ICALL                                         $9      
          9        ASSIGN_DIM                                               !2
         10        OP_DATA                                                  $9
   36    11      > JMP                                                      ->4
         12    >   FE_FREE                                                  $7
   40    13        INIT_FCALL                                               'json_encode'
         14        SEND_VAR                                                 !2
         15        SEND_VAL                                                 128
         16        DO_ICALL                                         $10     
         17        ECHO                                                     $10
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.1 ms | 998 KiB | 15 Q