3v4l.org

run code in 300+ PHP versions simultaneously
<?php $poxBox = array(); $poxBox[] = 'POBOX'; $poxBox[] = 'P.O\.'; $poxBox[] = 'P.O'; $poxBox[] = 'PO\.'; $poxBox[] = 'APO.'; $poxBox[] = 'A.P.O\.'; $poxBox[] = 'A.P.O'; $poxBox[] = 'GPO\.'; $poxBox[] = 'G.P.O\.'; $poxBox[] = 'G.P.O'; $poxBox[] = 'N.O\.'; $poxBox[] = 'N.O'; $poxBox[] = 'P.O.Box'; $poxBox[] = 'P.OBox'; $poxBox[] = 'PO.Box'; $poxBox[] = 'PO Box'; $poxBox[] = 'APO'; $poxBox[] = 'FPO'; $poxBox[] = 'PO'; $street1='po'; $isMatch = false; for($i =0 ; $i<count($poxBox); $i++){ $pattern = strtolower(trim($poxBox[$i])); $pos = preg_match('/\b'.$pattern.'\b/', $street1,$match); if ($pos) { // if ( preg_match('/'.$pattern.'/', $street1)){ $isMatch = 1; break; }else{ $isMatch = 2; } } echo $isMatch ;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 65
Branch analysis from position: 65
2 jumps found. (Code = 44) Position 1 = 68, Position 2 = 43
Branch analysis from position: 68
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 43
2 jumps found. (Code = 43) Position 1 = 60, Position 2 = 63
Branch analysis from position: 60
1 jumps found. (Code = 42) Position 1 = 68
Branch analysis from position: 68
Branch analysis from position: 63
2 jumps found. (Code = 44) Position 1 = 68, Position 2 = 43
Branch analysis from position: 68
Branch analysis from position: 43
filename:       /in/VSbgF
function name:  (null)
number of ops:  70
compiled vars:  !0 = $poxBox, !1 = $street1, !2 = $isMatch, !3 = $i, !4 = $pattern, !5 = $pos, !6 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN_DIM                                               !0
          2        OP_DATA                                                  'POBOX'
    5     3        ASSIGN_DIM                                               !0
          4        OP_DATA                                                  'P.O%5C.'
    6     5        ASSIGN_DIM                                               !0
          6        OP_DATA                                                  'P.O'
    7     7        ASSIGN_DIM                                               !0
          8        OP_DATA                                                  'PO%5C.'
    8     9        ASSIGN_DIM                                               !0
         10        OP_DATA                                                  'APO.'
    9    11        ASSIGN_DIM                                               !0
         12        OP_DATA                                                  'A.P.O%5C.'
   10    13        ASSIGN_DIM                                               !0
         14        OP_DATA                                                  'A.P.O'
   11    15        ASSIGN_DIM                                               !0
         16        OP_DATA                                                  'GPO%5C.'
   12    17        ASSIGN_DIM                                               !0
         18        OP_DATA                                                  'G.P.O%5C.'
   13    19        ASSIGN_DIM                                               !0
         20        OP_DATA                                                  'G.P.O'
   14    21        ASSIGN_DIM                                               !0
         22        OP_DATA                                                  'N.O%5C.'
   15    23        ASSIGN_DIM                                               !0
         24        OP_DATA                                                  'N.O'
   16    25        ASSIGN_DIM                                               !0
         26        OP_DATA                                                  'P.O.Box'
   17    27        ASSIGN_DIM                                               !0
         28        OP_DATA                                                  'P.OBox'
   18    29        ASSIGN_DIM                                               !0
         30        OP_DATA                                                  'PO.Box'
   19    31        ASSIGN_DIM                                               !0
         32        OP_DATA                                                  'PO+Box'
   20    33        ASSIGN_DIM                                               !0
         34        OP_DATA                                                  'APO'
   21    35        ASSIGN_DIM                                               !0
         36        OP_DATA                                                  'FPO'
   22    37        ASSIGN_DIM                                               !0
         38        OP_DATA                                                  'PO'
   24    39        ASSIGN                                                   !1, 'po'
   26    40        ASSIGN                                                   !2, <false>
   27    41        ASSIGN                                                   !3, 0
         42      > JMP                                                      ->65
   28    43    >   INIT_FCALL                                               'strtolower'
         44        INIT_FCALL                                               'trim'
         45        FETCH_DIM_R                                      ~30     !0, !3
         46        SEND_VAL                                                 ~30
         47        DO_ICALL                                         $31     
         48        SEND_VAR                                                 $31
         49        DO_ICALL                                         $32     
         50        ASSIGN                                                   !4, $32
   30    51        INIT_FCALL                                               'preg_match'
         52        CONCAT                                           ~34     '%2F%5Cb', !4
         53        CONCAT                                           ~35     ~34, '%5Cb%2F'
         54        SEND_VAL                                                 ~35
         55        SEND_VAR                                                 !1
         56        SEND_REF                                                 !6
         57        DO_ICALL                                         $36     
         58        ASSIGN                                                   !5, $36
   32    59      > JMPZ                                                     !5, ->63
   34    60    >   ASSIGN                                                   !2, 1
   35    61      > JMP                                                      ->68
         62*       JMP                                                      ->64
   38    63    >   ASSIGN                                                   !2, 2
   27    64        PRE_INC                                                  !3
         65    >   COUNT                                            ~41     !0
         66        IS_SMALLER                                               !3, ~41
         67      > JMPNZ                                                    ~42, ->43
   42    68    >   ECHO                                                     !2
         69      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.44 ms | 1404 KiB | 19 Q