PHP integer typ...LOGIN

PHP integer type is an integer

I keep saying, don't be intimidated by the meaning of a noun.

What exactly is plastic surgery?

The so-called integer type is the integer that everyone learns in mathematics.

Integer type - Integer, also called in English: integer. English abbreviation: int

Integers are divided into:

1.10 base

2.8 base (understood, basically not used)

3.16 base (understood, basically not used)

Integers (integers) have maximum and minimum value ranges in computers.

[Understand knowledge points, not commonly used in development] We often hear that 32-bit computers, that is, the maximum range of a 32-bit computer for one operation is -232 to 232-1 .
What about 64-bit computers? ——QQ截图20161114092320.png

Decimal declaration:

<?php
//为了方便大家记忆和前期学习,英文不好的朋友也可用拼音来声明变量。以后再用英文来声明变量也无所谓
//声明变量 整数,英文 int
//$int = 1000;
$zhengshu = 1000;
echo $zhengshu;
?>

Octal declaration: starts with 0, followed by an integer from 0 to 7 (understand the knowledge points)

<?php
//8进制的取值范围最大为0-7,即0,1,2,3,4,5,6,7

$bajingzhi =  033145;
echo $bajingzhi;

?>

Hexadecimal declaration: Starts with 0x, followed by 0-f. The abcdef of 0x is not case-sensitive. (Learn about knowledge points)

<?php
//16进制的取值范围最大为0-f,即0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f
$shiliu =  0x6ff;
echo $shiliu;
?>

The focus of this chapter is to learn how to declare a 10-system integer. It doesn't matter if you understand the declarations of octal and hexadecimal systems.

Thinking misunderstanding: It is easy to think about how the octal and hexadecimal systems came into being.


Next Section
<?php //16进制的取值范围最大为0-f,即0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f $shiliu = 0x6ff; echo $shiliu; ?>
submitReset Code
ChapterCourseware