Step by step learning PHP (2)-PHP type. 1. the built-in functions and structures of case-insensitive PHP are case-insensitive. For example, the copy code is as follows: htmlheadtitleHelloPHPtitleheadbody? Phpecho (HelloPHP); ECHO (H
1. case sensitivity
PHP built-in functions and structures are case-insensitive.
For example:
The code is as follows:
HelloPHP
Echo ("Hello PHP ");
ECHO ("Hello PHP ");
Echo ("Hello PHP ");
?>
The effect of the three is the same.
Others, user-defined class names and method names are case-insensitive.
For example:
The code is as follows:
HelloPHP
Function Test ()
{
Echo ("Hello PHP ");
}
Test ();
TEST ();
Test ();
?>
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:
The code is as follows:
$ IntTest = 1;
Echo (is_int ($ intTest ));
Echo ("
");
$ StringTest = "Test ";
Echo (is_string ($ stringTest ));
Echo ("
");
Echo (is_int ($ stringTest ));
?>
Http://www.bkjia.com/PHPjc/321311.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/321311.htmlTechArticle1. about case-insensitive PHP built-in functions and structures are case-insensitive. For example, the code is as follows: html head titleHelloPHP/title/head body? Php echo ("Hello PHP"); ECHO ("H...