fork(1) download
  1. <?php
  2.  
  3. $repl = 'C:\Users\Admin\1';
  4. //echo $repl;
  5. $template = "BEGIN this was the original content of the template END";
  6. echo preg_replace('/(BEGIN.*?END)/su', str_replace('\\', '\\\\', $repl), $template);
  7.  
Success #stdin #stdout 0.01s 52472KB
stdin
Standard input is empty
stdout
C:\Users\Admin\1