3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = 'The story is inspired by the Operation Batla House that took place in 2008 '; $tag = '2.0'; $pattern = '/(\s|^)'.preg_quote($tag, '/').'(?=[^a-z^A-Z])/i'; echo preg_replace($pattern, '2.0', $string);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ljIdK
function name:  (null)
number of ops:  13
compiled vars:  !0 = $string, !1 = $tag, !2 = $pattern
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'The+story+is+inspired+by+the+Operation+Batla+House+that+took+place+in+2008+'
    4     1        ASSIGN                                                       !1, '2.0'
    5     2        INIT_FCALL                                                   'preg_quote'
          3        SEND_VAR                                                     !1
          4        SEND_VAL                                                     '%2F'
          5        DO_ICALL                                             $5      
          6        CONCAT                                               ~6      '%2F%28%5Cs%7C%5E%29', $5
          7        CONCAT                                               ~7      ~6, '%28%3F%3D%5B%5Ea-z%5EA-Z%5D%29%2Fi'
          8        ASSIGN                                                       !2, ~7
    6     9        FRAMELESS_ICALL_3                preg_replace        ~9      !2, '2.0'
         10        OP_DATA                                                      !0
         11        ECHO                                                         ~9
         12      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.33 ms | 2236 KiB | 14 Q