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;

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
1542.96 ms | 472 KiB | 20 Q