fork(1) download
  1. <?php
  2.  
  3. $x = "@hello, @@hello, @hello, @@hello";
  4. $temp = '@hello';
  5. $x = preg_replace("/(?<!@)".$temp."/", "replaced", $x);
  6. echo $x;
Success #stdin #stdout 0.03s 52480KB
stdin
Standard input is empty
stdout
replaced, @@hello, replaced, @@hello