3v4l.org

run code in 300+ PHP versions simultaneously
<?php $match_counter =0; $array = array('Free Breakfast','Free Wireless Internet','Free Festival Breakfast'); $search = 'Breakfast'; foreach($array as $arr){ if(stripos($arr,$search) !==false){ echo $arr.PHP_EOL; $match_counter++; } } if($match_counter ==0){ echo 'No '.$search; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 15
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 15
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 14
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
Branch analysis from position: 15
filename:       /in/NTH1W
function name:  (null)
number of ops:  21
compiled vars:  !0 = $match_counter, !1 = $array, !2 = $search, !3 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
    3     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN                                                   !2, 'Breakfast'
    7     3      > FE_RESET_R                                       $7      !1, ->15
          4    > > FE_FETCH_R                                               $7, !3, ->15
    8     5    >   INIT_FCALL                                               'stripos'
          6        SEND_VAR                                                 !3
          7        SEND_VAR                                                 !2
          8        DO_ICALL                                         $8      
          9        TYPE_CHECK                                  1018          $8
         10      > JMPZ                                                     ~9, ->14
    9    11    >   CONCAT                                           ~10     !3, '%0A'
         12        ECHO                                                     ~10
   10    13        PRE_INC                                                  !0
    7    14    > > JMP                                                      ->4
         15    >   FE_FREE                                                  $7
   13    16        IS_EQUAL                                                 !0, 0
         17      > JMPZ                                                     ~12, ->20
   14    18    >   CONCAT                                           ~13     'No+', !2
         19        ECHO                                                     ~13
   15    20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.86 ms | 1002 KiB | 14 Q