fork(2) download
  1. <?php
  2. $var = 'This
  3. that
  4. then
  5. thar
  6. these
  7. them';
  8.  
  9. $var = preg_replace('/\n(?=.*?\n)/', "\n\t", $var);
  10.  
  11. echo $var;
  12. ?>
Success #stdin #stdout 0s 13112KB
stdin
Standard input is empty
stdout
This
	that
	then
	thar
	these
them