fork(3) download
  1. <?php
  2. function clean($string) {
  3. eval("\$string = \"$string\";");
  4. $string = str_replace(' ', ' ', $string); // Replaces all spaces with hyphens.
  5. return preg_replace('/[^a-zA-Z0-9_ %\[\]\.\(\)%\\:@&-]/s', '', $string); // Removes special chars.
  6. }
  7.  
  8. $d = clean("this was http:\\nice readlly n'ice 'test for@me to") ;
  9. echo $d;
  10. ?>
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
this was http:ice readlly nice test for@me to