3v4l.org

run code in 500+ PHP versions simultaneously
<?php $results_decoded = array ( 0 => array ( 'Result' => array ( 0 => array ( 'ERRORS' => '99012: Weborder number already exists : 20211049', ), ), ), 1 => array ( 'Result' => array ( 0 => array ( 'ERRORS' => '99012: Weborder number already exists : 20211048', ), ), ), 2 => array ( 'Result' => array ( 0 => array ( 'ERRORS' => '99012: Weborder number already exists : 20211050', ), ), ), 3 => array ( 'Result' => array ( 0 => array ( 'ERRORS' => '99012: Weborder number already exists : 20211050', ), ), ), 4 => array ( 'Result' => array ( 0 => array ( 'ERRORS' => '99012: Weborder number already exists : 20211049', ), ), ), 5 => array ( 'Result' => array ( 0 => array ( 'ERRORS' => '99012: Weborder number already exists : 20211046', ), ), ), 6 => array ( 'Result' => array ( 0 => array ( 'ERRORS' => '99012: Weborder number already exists : 20211045', ), ), ), 7 => array ( 'result' => '2007: New Web Order created successfully', ), 8 => array ( 'Result' => array ( 0 => array ( 'ERRORS' => '99012: Weborder number already exists : 20211046', ), ), )); foreach ($results_decoded as $inner_val){ if (isset($inner_val["Result"][0]["ERRORS"])) $result_array[] = $inner_val["Result"][0]["ERRORS"]; else $result_array[] = $inner_val["result"]; } echo json_encode($result_array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 17
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/TEPab
function name:  (null)
number of ops:  23
compiled vars:  !0 = $results_decoded, !1 = $inner_val, !2 = $result_array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   14     1      > FE_RESET_R                                           $4      !0, ->17
          2    > > FE_FETCH_R                                                   $4, !1, ->17
   15     3    >   FETCH_DIM_IS                                         ~5      !1, 'Result'
          4        FETCH_DIM_IS                                         ~6      ~5, 0
          5        ISSET_ISEMPTY_DIM_OBJ                             0          ~6, 'ERRORS'
          6      > JMPZ                                                         ~7, ->13
          7    >   FETCH_DIM_R                                          ~9      !1, 'Result'
          8        FETCH_DIM_R                                          ~10     ~9, 0
          9        FETCH_DIM_R                                          ~11     ~10, 'ERRORS'
         10        ASSIGN_DIM                                                   !2
         11        OP_DATA                                                      ~11
         12      > JMP                                                          ->16
   16    13    >   FETCH_DIM_R                                          ~13     !1, 'result'
         14        ASSIGN_DIM                                                   !2
         15        OP_DATA                                                      ~13
   14    16    > > JMP                                                          ->2
         17    >   FE_FREE                                                      $4
   19    18        INIT_FCALL                                                   'json_encode'
         19        SEND_VAR                                                     !2
         20        DO_ICALL                                             $14     
         21        ECHO                                                         $14
         22      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
155.81 ms | 1937 KiB | 14 Q