1. Case sensitivity
PHP built-in functions and structures are case-insensitive.
For example:
Copy codeThe Code is as follows:
<Html>
<Head>
<Title> HelloPHP </title>
</Head>
<Body>
<? Php
Echo ("Hello PHP ");
ECHO ("Hello PHP ");
Echo ("Hello PHP ");
?>
</Body>
</Html>
The effect of the three is the same.
Others, user-defined class names and method names are case-insensitive.
For example:
Copy codeThe Code is as follows:
<Html>
<Head>
<Title> HelloPHP </title>
</Head>
<Body>
<? Php
Function Test ()
{
Echo ("Hello PHP ");
}
Test ();
TEST ();
Test ();
?>
</Body>
</Html>
However, variables are case sensitive.
2. Variables
Only one sentence can be mentioned here. Even those who have been slightly touched by PHP will know that the PHP declaration variable starts with the dollar sign ($.
In the previous example, we can also see that.
3. Type judgment Function
In PHP, there are eight data types: integer, floating point, String, Boolean, array, object, NULL, and resource type.
There is an important function for determining the type, in the format of is_XX.
For example:
Copy codeThe Code is as follows:
<? Php
$ IntTest = 1;
Echo (is_int ($ intTest ));
Echo ("<br/> ");
$ StringTest = "Test ";
Echo (is_string ($ stringTest ));
Echo ("<br/> ");
Echo (is_int ($ stringTest ));
?>