I\'ve seen this a lot: $fp = fopen($filepath, \"w\") or die(); But I can\'t seem to find any real documentation on this \"or\" syntax. It\'s obvious enough what
$fp = fopen($filepath, \"w\") or die();
or just does a boolean comparison.
or
What's returned by fopen() can be treated as such a boolean value, because it returns FALSE if it fails (and a different value if it does not).
fopen()
FALSE
If it fails, the statement is evaluated to the right, and so the function die() is called.
die()