It deletes any line containing the comment expression ('<!--ShoutNum' . $GET['shout'] . '-->'). So, since your lines with "||" contain the c.e., it deletes them too (when they match the $GET value, that is).
Here's my complete testing code:
$huge_file = 'test.txt';
$new_huge_file = 'new_test.txt';
$_GET['shout'] = '2';
$lines = file($huge_file);
$find_txt = '<!--ShoutNum' . $_GET['shout'] . '-->';
$new_file = '';
foreach ($lines as $line) {
if (strpos($line, $find_txt) === false) {
$new_file .= $line;
}
}
$fp = fopen($new_huge_file, 'w');
fwrite($fp, $new_file);
fclose($fp);
echo nl2br(htmlentities(file_get_contents($new_huge_file)));
Here's the input file ("test.txt"):
<!--ShoutNum3-->Pobega: This is my third shout
||<!--ShoutNum3-->
<!--ShoutNum2-->Pobega: This is my second shout
||<!--ShoutNum2-->
<!--ShoutNum1-->Pobega: This is my first shout
||<!--ShoutNum1-->
And here's the output file ("new_test.txt"):
<!--ShoutNum3-->Pobega: This is my third shout
||<!--ShoutNum3-->
<!--ShoutNum1-->Pobega: This is my first shout
||<!--ShoutNum1-->
Run it yourself and see.
Edit: Really, unless you use it for something else, the "||" is unneeded.