3v4l.org

run code in 500+ PHP versions simultaneously
<?php $html = 'data-content="111"'; $var_2 = "222"; $html = preg_replace('/(["\'])111\1/i', '${1}' . "$var_2$1",$html); echo $html;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NUs7D
function name:  (null)
number of ops:  10
compiled vars:  !0 = $html, !1 = $var_2
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'data-content%3D%22111%22'
    4     1        ASSIGN                                                       !1, '222'
    5     2        NOP                                                          
          3        FAST_CONCAT                                          ~4      !1, '%241'
          4        CONCAT                                               ~5      '%24%7B1%7D', ~4
          5        FRAMELESS_ICALL_3                preg_replace        ~6      '%2F%28%5B%22%27%5D%29111%5C1%2Fi', ~5
          6        OP_DATA                                                      !0
          7        ASSIGN                                                       !0, ~6
    6     8        ECHO                                                         !0
    7     9      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.39 ms | 1872 KiB | 13 Q