Hello,
could someone help me understand this "or die.." construct?
I find this construct used for error handling, in combination with the @ prefix to suppress php error output. For example:
@($sql_query) or die("an error occurred..").
Now, I don't understand the semantic of this construct. I know OR as a boolean operator, taking two boolean arguments and returning a boolean result.
But here OR seems to be a control structure, used to execute the second function if the first one returns false.
Since OR is not among the control structures mentioned in the PHP Manual, I am not sure if I understand this right.
That would mean the php engine has to analize the context to figure out if in a given construct OR is the logical operator or the control structure.
Hey, that would be a really messy syntax grrrrrr .... ok, I'm new to PHP and already complaining ;-)