Thanks. I actually knew what it was , I more or less wanted some information on what you guys thought of it, and what the first and last line meant. Is that supposed to be specific or anything, or is it supposed to be three letters capitalized, or what is the convention?
Signatures are nothing but incriminating.
That is called a heredoc block and you can put in it what ever you need (from strings to php variables), without the need of escaping any quotes. It comes with a big con, though: it's slower that double quotes, and much slower than single quotes. Same security rules apply as for any string.
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
The speed differences are negligible though, as with most things, unless you're writing a very intensive script. It's less than milliseconds on a regular call.
Personally I wouldn't use it for SQL statements. They can get long, but not that long. It's much more useful for blocks of HTML, or for such things as sending out a form letter email from your script.
Make sure to note that when ending/closing your heredoc statement, like said above, it not only needs to match the text you started it with but it needs to be on a line all by itself. That means no TABS either, nothing. Otherwise it won't recognize an end to it :)
Actually, I wrote a little one the first time I learned PHP way back when. Used a complex ID string to create a comment-style and nested threading structure, with (for then) on-the-fly ability to switch between the two quite easily. I was proud of that, never got anywhere with it because I dropped out of web development for the next 7 years, but eh.
I'm not sure how a forum script should have any longer SQL statement than any other database connected script?
Just to give us that little rush we get when we have control.
It's basically so that if your block intends to use >>> a couple of times, you may find it easier to open and close it with the string EOF, but if your block intends to use EOF a couple times, maybe it'd be easier to open and close with >>> or whatever you wish to use. It's those little things that make people happy.
end of file, end of line, just habit to use that one.
And nope, using >>> won't work, I just tried it quick and it returns a parse error. The delimiter is case sensitive, and its your choice what you use. I don't think there's any real precedent for one way or the other like there is with constants vs variables, et al.
It's accepted that the Heredoc identifier be all uppercase alphabetical characters, that's the convention. The rules for naming the identifier are the same as for any other label in PHP (like naming a variable): it can only contain alphanumeric characters or the underscore, with the first character being either alphabetical or underscore (ie, no numbers at the beginning).