3v4l.org

run code in 300+ PHP versions simultaneously
<?php $formData = []; $results['staging_records'][0] = [ 'import_id' => 185, 'customer_id' => 106, 'form_data' =>'[{"0":"2017-11-03 12:40:47","1":327,"2":"BR","3":"106","4":"117399795","5":"A","6":"ANTHONY "}]' ]; $results['staging_records'][1] = [ 'import_id' => 186, 'customer_id' => 107, 'form_data' => '[{"0":"2017-11-03 12:40:47","1":327,"2":"BR","3":"107","4":"117399795","5":"A","6":"WALT "}]' ]; if (count($results['staging_records'])) { $formData = []; foreach($results['staging_records'] as $data) { $formData[] = [ 'data' => json_decode($data['form_data'], true), 'import_id' => $data['import_id'] ]; } $formJSON = (json_encode($formData)); } var_dump($formData);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 30
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 25
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 25
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
Branch analysis from position: 30
filename:       /in/UHDQ9
function name:  (null)
number of ops:  34
compiled vars:  !0 = $formData, !1 = $results, !2 = $data, !3 = $formJSON
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        FETCH_DIM_W                                      $5      !1, 'staging_records'
          2        ASSIGN_DIM                                               $5, 0
    5     3        OP_DATA                                                  <array>
   10     4        FETCH_DIM_W                                      $7      !1, 'staging_records'
          5        ASSIGN_DIM                                               $7, 1
   11     6        OP_DATA                                                  <array>
   16     7        FETCH_DIM_R                                      ~9      !1, 'staging_records'
          8        COUNT                                            ~10     ~9
          9      > JMPZ                                                     ~10, ->30
   17    10    >   ASSIGN                                                   !0, <array>
   19    11        FETCH_DIM_R                                      ~12     !1, 'staging_records'
         12      > FE_RESET_R                                       $13     ~12, ->25
         13    > > FE_FETCH_R                                               $13, !2, ->25
   21    14    >   INIT_FCALL                                               'json_decode'
         15        FETCH_DIM_R                                      ~15     !2, 'form_data'
         16        SEND_VAL                                                 ~15
         17        SEND_VAL                                                 <true>
         18        DO_ICALL                                         $16     
         19        INIT_ARRAY                                       ~17     $16, 'data'
   22    20        FETCH_DIM_R                                      ~18     !2, 'import_id'
         21        ADD_ARRAY_ELEMENT                                ~17     ~18, 'import_id'
   20    22        ASSIGN_DIM                                               !0
   22    23        OP_DATA                                                  ~17
   19    24      > JMP                                                      ->13
         25    >   FE_FREE                                                  $13
   27    26        INIT_FCALL                                               'json_encode'
         27        SEND_VAR                                                 !0
         28        DO_ICALL                                         $19     
         29        ASSIGN                                                   !3, $19
   30    30    >   INIT_FCALL                                               'var_dump'
         31        SEND_VAR                                                 !0
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
188.26 ms | 1396 KiB | 19 Q