1. Case sensitivity
PHP built-in functions and structures are case-insensitive.
For example:
CopyCode The 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 code The 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. variable
only one sentence is provided here. Even people 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, and object, null and resource type.
an important function is used to determine the type. The format is is_xx.
example: copy Code the code is as follows: $ inttest = 1;
echo (is_int ($ inttest);
echo ("
");
$ stringtest = "test";
echo (is_string ($ stringtest);
echo ("
");
echo (is_int ($ stringtest);
?>