Syntax: integer values can be expressed in decimal, hexadecimal, or octal, preceded by an optional symbol (-or +). Octal indicates that the number must be preceded by 0 (0), and hexadecimal indicates that the number must be preceded by 0x.
$int 1=100; Decimal
$int 2=-123; Negative
$int 3=0123; Octal number
$int 4=0x1a;//Hexadecimal number
echo php_int_size; Displays an integer in a few bytes to represent
echo "
";
echo Php_int_max, echo "
";//integer maximum number (2147483647)
$fmax = 2147483648;
Var_dump (Php_int_max); a number that exceeds the range of integers will be interpreted as a float type.
echo "
";
Var_dump ($fmax);
Floating-point numbers: floating-point numbers (double-precision or real numbers)
$a = 1.34;
$b =1.8e308;
$c =8e-10;
Var_dump ($b);
The length of the floating-point number is relative to the platform, although the usual maximum value is 1.8e308 and has a precision of 14-bit decimal digits (no more than 14 bits)
The precision is calculated from the first non-0 number that begins on the left.
Example: $a = 567.9999899//Output 567.9999899
$b = 789.8812345678543//Output 789.88123456785
$c = 0.000000008907777777//Output 0.000000008907777777
Important understanding: The accuracy is calculated from the first non-0 number starting on the left.
http://www.bkjia.com/PHPjc/326908.html www.bkjia.com true http://www.bkjia.com/PHPjc/326908.html techarticle syntax: integer values can be expressed in decimal, hexadecimal, or octal, preceded by an optional symbol (-or +). Octal notation must be preceded by a number of 0 (0), 16 ...