3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ 'ticket_number' => 'sdfsdfsdf 2', 'strategy_id' => '5', 'journal_entries_strategy_conditions' => [ 0 => [ 'strategies_condition_id' => '' ], 1 => [ 'strategies_condition_id' => '1' ] ], 'timeframe' => '', ]; foreach ($array['journal_entries_strategy_conditions'] as $i => $row) { if (!$row['strategies_condition_id']) { array_splice($array['journal_entries_strategy_conditions'], $i, 1); } } var_export($array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 15
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 15
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 14
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/41LK2
function name:  (null)
number of ops:  20
compiled vars:  !0 = $array, !1 = $row, !2 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   17     1        FETCH_DIM_R                                          ~4      !0, 'journal_entries_strategy_conditions'
          2      > FE_RESET_R                                           $5      ~4, ->15
          3    > > FE_FETCH_R                                           ~6      $5, !1, ->15
          4    >   ASSIGN                                                       !2, ~6
   18     5        FETCH_DIM_R                                          ~8      !1, 'strategies_condition_id'
          6        BOOL_NOT                                             ~9      ~8
          7      > JMPZ                                                         ~9, ->14
   19     8    >   INIT_FCALL                                                   'array_splice'
          9        FETCH_DIM_W                                          $10     !0, 'journal_entries_strategy_conditions'
         10        SEND_REF                                                     $10
         11        SEND_VAR                                                     !2
         12        SEND_VAL                                                     1
         13        DO_ICALL                                                     
   17    14    > > JMP                                                          ->3
         15    >   FE_FREE                                                      $5
   23    16        INIT_FCALL                                                   'var_export'
         17        SEND_VAR                                                     !0
         18        DO_ICALL                                                     
         19      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
147.58 ms | 1801 KiB | 15 Q