3v4l.org

run code in 300+ PHP versions simultaneously
<?php $replace = array( "/(dog)/i", "/(cat)/i" ); $with = '<strong>$1</strong>'; $str = "I like Dog and cAT"; $str = preg_replace($replace, $with, $str); echo $str;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QgWDE
function name:  (null)
number of ops:  11
compiled vars:  !0 = $replace, !1 = $with, !2 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, '%3Cstrong%3E%241%3C%2Fstrong%3E'
   10     2        ASSIGN                                                   !2, 'I+like+Dog+and+cAT'
   12     3        INIT_FCALL                                               'preg_replace'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !2, $6
   14     9        ECHO                                                     !2
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.57 ms | 1394 KiB | 15 Q