3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rows = [ ['id' => 21, 'text' => 't1', 'Mon' => 1], ['id' => 22, 'text' => 't2', 'Mon' => 0], ['id' => 23, 'text' => 't3', 'Mon' => 1], ]; $rowsResult = []; foreach($rows as $index => $row){ if($row['Mon'] == 1){ $rowsResult [$index] = $row; } } var_dump($rowsResult);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 10
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/Ejmmf
function name:  (null)
number of ops:  16
compiled vars:  !0 = $rows, !1 = $rowsResult, !2 = $row, !3 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, <array>
   10     2      > FE_RESET_R                                       $6      !0, ->11
          3    > > FE_FETCH_R                                       ~7      $6, !2, ->11
          4    >   ASSIGN                                                   !3, ~7
   11     5        FETCH_DIM_R                                      ~9      !2, 'Mon'
          6        IS_EQUAL                                                 ~9, 1
          7      > JMPZ                                                     ~10, ->10
   12     8    >   ASSIGN_DIM                                               !1, !3
          9        OP_DATA                                                  !2
   10    10    > > JMP                                                      ->3
         11    >   FE_FREE                                                  $6
   16    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.98 ms | 1395 KiB | 15 Q