<?php
$data = file_get_contents('file_to_shrink.php');
$data = str_replace("\n"," ",$data);
$file = fopen('shrunk_file.php','x');
fwrite($file,$data);
fclose($file);
?>
You realize that doesn't make the program any smaller, right? It only makes the source code hard as hell to read...