84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
What will happen if you accidentally set the names of two variables to be the same - PHP Chinese website Q&A - What will happen if you accidentally set the names of two variables to be the same - PHP Chinese website Q&A
Take a look around, Study it.
两个变量名一样的话,会覆盖掉一个变量,下面的变量会将上面的变量覆盖掉,就像下面这样
$x=5; $x=10;
这两个变量名是一样的,但是只有$x=10;才会有用,你如果输出$x,那么结果一定是10;
记住,相同的变量名会被覆盖
What will happen if you accidentally set the names of two variables to be the same - PHP Chinese website Q&A - What will happen if you accidentally set the names of two variables to be the same - PHP Chinese website Q&A
Take a look around, Study it.
两个变量名一样的话,会覆盖掉一个变量,下面的变量会将上面的变量覆盖掉,就像下面这样
这两个变量名是一样的,但是只有$x=10;才会有用,你如果输出$x,那么结果一定是10;
记住,相同的变量名会被覆盖