3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = Array ( 0 => Array ( 'id' => 1, 'column2' => 'value2', 'column3' => 'value3', 'column4' => 'value4', 'column5' => 'value5' ), 1 => Array ( 'id' => 1, 'column2' => 'value2', 'column3' => 'value3', 'column4' => 'value4', 'column5' => 'value5' ), 2 => Array ( 'id' => 2, 'column2' => 'value2', 'column3' => 'value3', 'column4' => 'value4', 'column5' => 'value5' ), ); $filtered = array(); foreach($array as $index => $columns) { foreach($columns as $key => $value) { if ($key == 'id' && $value == '1') { $filtered[] = $columns; } } } print_r($filtered);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 18
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 18
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 16
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 16
Branch analysis from position: 7
2 jumps found. (Code = 46) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 15
Branch analysis from position: 12
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 16
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/LRAB6
function name:  (null)
number of ops:  23
compiled vars:  !0 = $array, !1 = $filtered, !2 = $columns, !3 = $index, !4 = $value, !5 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, <array>
   12     2      > FE_RESET_R                                       $8      !0, ->18
          3    > > FE_FETCH_R                                       ~9      $8, !2, ->18
          4    >   ASSIGN                                                   !3, ~9
   13     5      > FE_RESET_R                                       $11     !2, ->16
          6    > > FE_FETCH_R                                       ~12     $11, !4, ->16
          7    >   ASSIGN                                                   !5, ~12
   14     8        IS_EQUAL                                         ~14     !5, 'id'
          9      > JMPZ_EX                                          ~14     ~14, ->12
         10    >   IS_EQUAL                                         ~15     !4, '1'
         11        BOOL                                             ~14     ~15
         12    > > JMPZ                                                     ~14, ->15
   15    13    >   ASSIGN_DIM                                               !1
         14        OP_DATA                                                  !2
   13    15    > > JMP                                                      ->6
         16    >   FE_FREE                                                  $11
   12    17      > JMP                                                      ->3
         18    >   FE_FREE                                                  $8
   20    19        INIT_FCALL                                               'print_r'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.4 ms | 1401 KiB | 15 Q