3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str ="Model number is FM223-56/89."; $model ="FM223-56/89."; $pattern = '/(?!\B\w)' . preg_quote($model, '/') . '(?<!\w\B)/'; echo preg_match($pattern, $str);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZhopS
function name:  (null)
number of ops:  15
compiled vars:  !0 = $str, !1 = $model, !2 = $pattern
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Model+number+is+FM223-56%2F89.'
    4     1        ASSIGN                                                   !1, 'FM223-56%2F89.'
    5     2        INIT_FCALL                                               'preg_quote'
          3        SEND_VAR                                                 !1
          4        SEND_VAL                                                 '%2F'
          5        DO_ICALL                                         $5      
          6        CONCAT                                           ~6      '%2F%28%3F%21%5CB%5Cw%29', $5
          7        CONCAT                                           ~7      ~6, '%28%3F%3C%21%5Cw%5CB%29%2F'
          8        ASSIGN                                                   !2, ~7
    6     9        INIT_FCALL                                               'preg_match'
         10        SEND_VAR                                                 !2
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $9      
         13        ECHO                                                     $9
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.1 ms | 1001 KiB | 15 Q