fork download
  1. <?php
  2.  
  3. $str = "Text one, include two and others three or four";
  4. $search = ['one', 'two', 'three', 'four'];
  5. $replace = ['NEW1', 'NEW2', 'NEW3', 'NEW4'];
  6. echo str_replace($search, $replace, $str);
Success #stdin #stdout 0s 82880KB
stdin
Standard input is empty
stdout
Text NEW1, include NEW2 and others NEW3 or NEW4