found a very interesting phenomenon in PHP, but I don"t know how to explain it. The code goes like this:
$str1 = "01 ";
$str1PP;
echo $str1;//01
$str1 = "01";
$str1PP;
echo $str1;//2
Why is it interesting that $str1 is a string, but the first $str1 equals "01" with an extra space, so even if you use PP, the output is still itself. According to reason, doesn"t PHP automatically convert the string calculation into a number (1) to force the accumulation? how come it doesn"t count because it contains a space?
depressed, ask for an explanation. Thank you