3v4l.org

run code in 500+ PHP versions simultaneously
<?php $dynamic_list = "AZ, CA, CO"; $static_list = "MN,WA,IA"; $search = "AZ"; if ( strpos($dynamic_list . ',' . $static_list, $search) == false && !empty($search) ) { // check string is not empty + that it is not on any of the lists echo 'not found: String '.$search.' was not found in lists'; } else { echo 'found'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/VV04d
function name:  (null)
number of ops:  18
compiled vars:  !0 = $dynamic_list, !1 = $static_list, !2 = $search
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'AZ%2C+CA%2C+CO'
    4     1        ASSIGN                                                       !1, 'MN%2CWA%2CIA'
    6     2        ASSIGN                                                       !2, 'AZ'
    9     3        CONCAT                                               ~6      !0, '%2C'
          4        CONCAT                                               ~7      ~6, !1
          5        FRAMELESS_ICALL_2                strpos              ~8      ~7, !2
          6        IS_EQUAL                                             ~9      ~8, <false>
          7      > JMPZ_EX                                              ~9      ~9, ->11
          8    >   ISSET_ISEMPTY_CV                                     ~10     !2
          9        BOOL_NOT                                             ~11     ~10
         10        BOOL                                                 ~9      ~11
         11    > > JMPZ                                                         ~9, ->16
   10    12    >   CONCAT                                               ~12     'not+found%3A+String+', !2
         13        CONCAT                                               ~13     ~12, '+was+not+found+in+lists'
         14        ECHO                                                         ~13
    9    15      > JMP                                                          ->17
   12    16    >   ECHO                                                         'found'
   13    17    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.47 ms | 2268 KiB | 13 Q