3v4l.org

run code in 500+ PHP versions simultaneously
<?php $tests = [ 'This isXYZ a :exampleXYZa', 'isXYZ a :exampleXYZa abcXYZ', 'isXYZ a :exampleXYZXYZa abcXYZ', 'XYZ', 'XYZjdhf', 'This isXYZ a example:XYZa', 'äöüéèXYZ :äöüéèXYZäöüéè' ]; foreach($tests as $test){ if(preg_match_all('/\b((?<!:)\w*XYZ\w*)\b/ui',$test,$matches)){ print_r($matches[0]); } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 14
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 13
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/Y8SMj
function name:  (null)
number of ops:  16
compiled vars:  !0 = $tests, !1 = $test, !2 = $matches
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   13     1      > FE_RESET_R                                           $4      !0, ->14
          2    > > FE_FETCH_R                                                   $4, !1, ->14
   14     3    >   INIT_FCALL                                                   'preg_match_all'
          4        SEND_VAL                                                     '%2F%5Cb%28%28%3F%3C%21%3A%29%5Cw%2AXYZ%5Cw%2A%29%5Cb%2Fui'
          5        SEND_VAR                                                     !1
          6        SEND_REF                                                     !2
          7        DO_ICALL                                             $5      
          8      > JMPZ                                                         $5, ->13
   15     9    >   INIT_FCALL                                                   'print_r'
         10        FETCH_DIM_R                                          ~6      !2, 0
         11        SEND_VAL                                                     ~6
         12        DO_ICALL                                                     
   13    13    > > JMP                                                          ->2
         14    >   FE_FREE                                                      $4
   17    15      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
217.37 ms | 2173 KiB | 15 Q