Basic Syntax

Statements are separated by ‘;’. Inline comments are denoted by // or #. Block comments are denoted by /**/.

At any point, the script may be terminated with return, die, or exit, which can take on several forms:
return; # returning from a global scope
exit; # termination
exit();  # termination
exit(0); // successful termination
exit(200);  // status 200 returned
exit(“ERROR”); // prints the string before exiting
die(“ERROR”); // die is the same as exit
  
After a script has been terminated in one of these ways, the remaining HTML part of the document after ?> is discarded.