Constant. Any PHP scripting language is created using continuous statements. A statement can be a value assignment statement, a function call, a loop, a condition statement, or even a PHP script language that does not do anything, is created using a continuous statement. A statement can be a value assignment statement, a function call, a loop, a condition statement, or even a statement (an empty statement) that does not do anything ). Statements often end with semicolons. In addition, you can use volume support to compress a group of statements so that the statements can be grouped into statement groups. A statement group is a statement about itself. Different statement types are described in this chapter.
Constant
PHP defines some constants that are provided to the structure so that it can define more types at runtime. Constants are similar to variables, but they are slightly different in syntax.
The predefined constants are _ FILE _ and _ LINE __. when processing them, they are found to match the FILE name and row number. See the following example:
Example 6-1. Using _ FILE _ and _ LINE _ // use _ FILE _ and _ LINE __
Function report_error ($ file, $ line, $ message ){
Echo "An error occured in $ file on line $ line: $ message .";
}
Report_error (_ FILE __,__ LINE __, "Something went wrong! ");
?>
You can use the define () and undefine () functions to define other constants.
Example 6-2. Defining Constants // define a constant
Define ("CONSTANT", "Hello world .");
Echo CONSTANT; // outputs "Hello world ."
Undefine ("CONSTANT ");
?>
Bytes. A statement can be a value assignment statement, a function call, a loop, a condition statement, or even one that does not do anything...