3v4l.org

run code in 500+ PHP versions simultaneously
<?php $sentence='This is the sentence to be searhed through'; $search = 'sent'; $result = preg_replace("/" . preg_quote($search, "/") . "/ui", "<strong style='color:yellow'>$0</strong>", $sentence); echo $result;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X69hk
function name:  (null)
number of ops:  13
compiled vars:  !0 = $sentence, !1 = $search, !2 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'This+is+the+sentence+to+be+searhed+through'
    4     1        ASSIGN                                                       !1, 'sent'
    5     2        INIT_FCALL                                                   'preg_quote'
          3        SEND_VAR                                                     !1
          4        SEND_VAL                                                     '%2F'
          5        DO_ICALL                                             $5      
          6        CONCAT                                               ~6      '%2F', $5
          7        CONCAT                                               ~7      ~6, '%2Fui'
          8        FRAMELESS_ICALL_3                preg_replace        ~8      ~7, '%3Cstrong+style%3D%27color%3Ayellow%27%3E%240%3C%2Fstrong%3E'
          9        OP_DATA                                                      !0
         10        ASSIGN                                                       !2, ~8
    6    11        ECHO                                                         !2
    7    12      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
172.76 ms | 2000 KiB | 16 Q