3v4l.org

run code in 300+ PHP versions simultaneously
<?php $datas = [ [ 'id' => 2135, 'first_name' => 'John', 'last_name' => 'Doe', 'gender' => 'male' ], [ 'id' => 3245, 'first_name' => 'Sally', 'last_name' => 'Smith', 'gender' => 'female' ], [ 'id' => 5342, 'first_name' => 'Jane', 'last_name' => 'Doe', 'gender' => 'female' ], [ 'id' => 5623, 'first_name' => 'Peter', 'last_name' => 'Doe', 'gender' => 'male' ], [ 'id' => 7216, 'first_name' => 'Mike', 'last_name' => 'Lill', 'gender' => 'male' ] ]; $needles = ['Doe', 'male']; foreach ($datas as $row) { foreach ($needles as $needle) { if (!in_array($needle, $row)) { continue 2; } } $result[] = $row; } var_export($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 19
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 19
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 15
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 15
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 15
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/PaDl9
function name:  (null)
number of ops:  24
compiled vars:  !0 = $datas, !1 = $needles, !2 = $row, !3 = $needle, !4 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   36     1        ASSIGN                                                   !1, <array>
   38     2      > FE_RESET_R                                       $7      !0, ->19
          3    > > FE_FETCH_R                                               $7, !2, ->19
   39     4    > > FE_RESET_R                                       $8      !1, ->15
          5    > > FE_FETCH_R                                               $8, !3, ->15
   40     6    >   INIT_FCALL                                               'in_array'
          7        SEND_VAR                                                 !3
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                         $9      
         10        BOOL_NOT                                         ~10     $9
         11      > JMPZ                                                     ~10, ->14
   41    12    >   FE_FREE                                                  $8
         13      > JMP                                                      ->3
   39    14    > > JMP                                                      ->5
         15    >   FE_FREE                                                  $8
   44    16        ASSIGN_DIM                                               !4
         17        OP_DATA                                                  !2
   38    18      > JMP                                                      ->3
         19    >   FE_FREE                                                  $7
   46    20        INIT_FCALL                                               'var_export'
         21        SEND_VAR                                                 !4
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.31 ms | 1007 KiB | 15 Q