1. About capitalization
PHP's built-in functions and structures are case-insensitive.
Such as:
Copy the Code code as follows:
hellophp
Echo ("Hello PHP");
ECHO ("Hello PHP");
Echo ("Hello PHP");
?>
The effect of these three is the same.
Other, user-defined class names and method names are also case insensitive.
For example:
Copy the Code code as follows:
hellophp
function Test ()
{
Echo ("Hello PHP");
}
Test ();
TEST ();
Test ();
?>
However, the variables are case-sensitive.
2. Variables
One thing to mention here is that even a little bit of PHP will know that PHP declaration variables start with a dollar ($) symbol.
In the previous example, we can also see.
3. Type judgment function
In PHP, there are eight types of data: integer, Float, String, Boolean, array, object, NULL, and resource type.
There is a very important function for judging the type, in the form of is_xx.
For example:
Copy the Code code as follows:
$intTest = 1;
Echo (Is_int ($intTest));
Echo ("
");
$stringTest = "Test";
Echo (Is_string ($stringTest));
Echo ("
");
Echo (Is_int ($stringTest));
?>
The above is introduced to learn PHP step-by-step learning php2--php type, including the content of learning PHP, I hope the PHP tutorial interested in a friend helpful.