From the manual:
void __halt_compiler ( void )
This function halts the execution of the compiler. This can be useful to embe
Assume you have one script with some php code and lots and lots of binary clutter.
then you want the compiler to NOT try to parse the binary because if there is somewhere in the binary it would break.
The point is being able to just ship one file with binary data and php code.
For a little example see this blog post
So you want not only to stop the execution of a script (like exit() would) but to stop the parsing so that you can have "invalid syntax" at the end of file and php still can execute the first part.
This will get parsed as valid php and execute just fine:
This will output §RW$FG$%ZDS$TSG$TSZ%U(); §$"§%"§$!!();