fork download
  1. <?php
  2.  
  3. $string = 'привет как дела';
  4. $patterns = '/[пк]/u';
  5. $replacements = 'р';
  6. echo preg_replace($patterns, $replacements, $string);
Success #stdin #stdout 0.02s 24448KB
stdin
Standard input is empty
stdout
рривет рар дела