<?php
$str = file_get_contents($file);
?>
vs.

<?php
$fp = fopen($file, 'r');
while (($line = fgets($fp)) !== false) {
    $str .= $line;
}
fclose($fp);
?>