3v4l.org

run code in 500+ PHP versions simultaneously
<?php $dynamic_list = "AZ, CA, CO"; $static_list = "MN,WA,IA"; $search = "AZ"; if (!empty($search) && strpos($dynamic_list . ',' . $static_list, $search) === false) { // 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 = 6, Position 2 = 11
Branch analysis from position: 6
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/mSqqN
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        ISSET_ISEMPTY_CV                                     ~6      !2
          4        BOOL_NOT                                             ~7      ~6
          5      > JMPZ_EX                                              ~7      ~7, ->11
          6    >   CONCAT                                               ~8      !0, '%2C'
          7        CONCAT                                               ~9      ~8, !1
          8        FRAMELESS_ICALL_2                strpos              ~10     ~9, !2
          9        TYPE_CHECK                                        4  ~11     ~10
         10        BOOL                                                 ~7      ~11
         11    > > JMPZ                                                         ~7, ->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:
144.88 ms | 2128 KiB | 13 Q