3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/(")([^"]+)(")/'; $str = 'The nice man said "How\'s things today" and I replied "All is good thanks".'; $subst = '<i class="fa fa-quote-left" aria-hidden="true"></i>\\2<i class="fa fa-quote-right" aria-hidden="true"></i>'; echo preg_replace($re, $subst, $str);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7hlYe
function name:  (null)
number of ops:  10
compiled vars:  !0 = $re, !1 = $str, !2 = $subst
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2F%28%22%29%28%5B%5E%22%5D%2B%29%28%22%29%2F'
    4     1        ASSIGN                                                   !1, 'The+nice+man+said+%22How%27s+things+today%22+and+I+replied+%22All+is+good+thanks%22.'
    5     2        ASSIGN                                                   !2, '%3Ci+class%3D%22fa+fa-quote-left%22+aria-hidden%3D%22true%22%3E%3C%2Fi%3E%5C2%3Ci+class%3D%22fa+fa-quote-right%22+aria-hidden%3D%22true%22%3E%3C%2Fi%3E'
    7     3        INIT_FCALL                                               'preg_replace'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $6      
          8        ECHO                                                     $6
          9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.71 ms | 1398 KiB | 15 Q