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 = array_merge($formData, json_decode($data['form_data'], true)); $import_id = $data['import_id']; } $formJSON = (json_encode($formData)); } // $output = [1,3,5]; var_dump($formData);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 32
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 27
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 27
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
Branch analysis from position: 32
filename:       /in/BhmCU
function name:  (null)
number of ops:  36
compiled vars:  !0 = $formData, !1 = $results, !2 = $data, !3 = $import_id, !4 = $formJSON
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    5     1        FETCH_DIM_W                                      $6      !1, 'staging_records'
          2        ASSIGN_DIM                                               $6, 0
    6     3        OP_DATA                                                  <array>
   11     4        FETCH_DIM_W                                      $8      !1, 'staging_records'
          5        ASSIGN_DIM                                               $8, 1
   12     6        OP_DATA                                                  <array>
   18     7        FETCH_DIM_R                                      ~10     !1, 'staging_records'
          8        COUNT                                            ~11     ~10
          9      > JMPZ                                                     ~11, ->32
   19    10    >   ASSIGN                                                   !0, <array>
   21    11        FETCH_DIM_R                                      ~13     !1, 'staging_records'
         12      > FE_RESET_R                                       $14     ~13, ->27
         13    > > FE_FETCH_R                                               $14, !2, ->27
   22    14    >   INIT_FCALL                                               'array_merge'
         15        SEND_VAR                                                 !0
         16        INIT_FCALL                                               'json_decode'
         17        FETCH_DIM_R                                      ~15     !2, 'form_data'
         18        SEND_VAL                                                 ~15
         19        SEND_VAL                                                 <true>
         20        DO_ICALL                                         $16     
         21        SEND_VAR                                                 $16
         22        DO_ICALL                                         $17     
         23        ASSIGN                                                   !0, $17
   23    24        FETCH_DIM_R                                      ~19     !2, 'import_id'
         25        ASSIGN                                                   !3, ~19
   21    26      > JMP                                                      ->13
         27    >   FE_FREE                                                  $14
   26    28        INIT_FCALL                                               'json_encode'
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                         $21     
         31        ASSIGN                                                   !4, $21
   30    32    >   INIT_FCALL                                               'var_dump'
         33        SEND_VAR                                                 !0
         34        DO_ICALL                                                 
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.15 ms | 1396 KiB | 21 Q