fork(5) download
  1. <?php
  2. $string = "Add dot after last character before new line\n";
  3. $string = preg_replace("/(.)$/", "$1.\n", $string);
  4. print $string;
  5. ?>
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
Add dot after last character before new line.