When testing an answer for another user\'s question I found something I don\'t understand. The problem was to replace all literal \\t \\n \\r
\\t
\\n
\\r
Use str_replace!
$code = str_replace(array("\t","\n","\r"),'',$code);
Should do the trick