Home >Backend Development >PHP Tutorial >PHP data types
The content of this article mainly introduces the data types of PHP, which has certain reference value. Now I share it with everyone. Friends in need can refer to it
There are eight data types in PHP
can be divided into three categories
Scalar: floating point, integer, character String, Boolean
Composite: array, object
Special: null, resource
Floating point types must not be used in equality judgments. There will be loss when the computer converts to binary calculations
Boolean type
False seven situations: 0, 0.0, ' ', '0', false, array()//empty array, NULL
Detailed explanation of $_SERVER: http://php.net/manual/zh/reserved.variables.server.php
define('P1',"hello"); const P2 = "world";
Related recommendations:
php Data types and conversions What are the data types of PHP? What are the data types of PHP?The above is the detailed content of PHP data types. For more information, please follow other related articles on the PHP Chinese website!