数据分析师2017-09-30 23:06:31
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.
哈哈哈2016-12-20 13:40:31
两个变量名一样的话,会覆盖掉一个变量,下面的变量会将上面的变量覆盖掉,就像下面这样
$x=5; $x=10;
这两个变量名是一样的,但是只有$x=10;才会有用,你如果输出$x,那么结果一定是10;
记住,相同的变量名会被覆盖