title: Remove newlines from text usin constant PHP_EOL
body: <pre><code>$str = "1
  2";
  $str = preg_replace( "#".PHP_EOL."|\t#", "", $str );
  $hand = fopen("t.txt", "w+");
  fwrite($hand, $str);
  fclose($hand);
  </code></pre>
  
  <p>I need that remove newlines and horizontal tabs from string and then write into <code>txt</code> file.</p>
  
  <p>The code above, removes only horizontal tabs, but newlines  stays, that is in text file is writed:</p>
  
  <pre><code>1
  2
  </code></pre>
  
  <p>Where I am wrong?</p>