3v4l.org

run code in 300+ PHP versions simultaneously
<?php $list = [ ['name' => 'this is items name', 'number' => 1, 'description' => 'this is description', 'id' => 'just some id',], ['name' => 'this is items name2', 'number' => 1, 'description' => 'this is description2', 'id' => 'just some id',], ['name' => 'this is items name3', 'number' => 1, 'description' => 'this is', 'id' => 'just some id',] ]; $qualifiers =[]; $needles = explode(" ", "this description"); foreach ($list as $index => $set) { $smashed = implode($set); foreach ($needles as $needle) { // echo "\n$smashed"; if (strpos($smashed, $needle) === false) { continue 2; } } $qualifiers[] = $index; } var_export($qualifiers);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 29
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 29
Branch analysis from position: 9
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 25
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 25
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 25
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/N288o
function name:  (null)
number of ops:  34
compiled vars:  !0 = $list, !1 = $qualifiers, !2 = $needles, !3 = $set, !4 = $index, !5 = $smashed, !6 = $needle
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   18     1        ASSIGN                                                   !1, <array>
   19     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '+'
          4        SEND_VAL                                                 'this+description'
          5        DO_ICALL                                         $9      
          6        ASSIGN                                                   !2, $9
   21     7      > FE_RESET_R                                       $11     !0, ->29
          8    > > FE_FETCH_R                                       ~12     $11, !3, ->29
          9    >   ASSIGN                                                   !4, ~12
   22    10        INIT_FCALL                                               'implode'
         11        SEND_VAR                                                 !3
         12        DO_ICALL                                         $14     
         13        ASSIGN                                                   !5, $14
   23    14      > FE_RESET_R                                       $16     !2, ->25
         15    > > FE_FETCH_R                                               $16, !6, ->25
   25    16    >   INIT_FCALL                                               'strpos'
         17        SEND_VAR                                                 !5
         18        SEND_VAR                                                 !6
         19        DO_ICALL                                         $17     
         20        TYPE_CHECK                                    4          $17
         21      > JMPZ                                                     ~18, ->24
   26    22    >   FE_FREE                                                  $16
         23      > JMP                                                      ->8
   23    24    > > JMP                                                      ->15
         25    >   FE_FREE                                                  $16
   29    26        ASSIGN_DIM                                               !1
         27        OP_DATA                                                  !4
   21    28      > JMP                                                      ->8
         29    >   FE_FREE                                                  $11
   32    30        INIT_FCALL                                               'var_export'
         31        SEND_VAR                                                 !1
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.34 ms | 1400 KiB | 21 Q