php
<?phpfunction test (&$b){ $b++; echo $b.''; }test($a);$a=100;echo $a;
This code has been changed to better understand the changes in $a:
<?php function test (&$b){ $b++; echo $b.' '; } test($a); echo $a; $a=100; echo $a;
Yes, php will initialize a default value for unassigned code. For integers, This value is 0
The initialization value is the same as java.
What should I pay attention to when studying? I think the most important thing is to apply what you have learned, practice more, and write some code that has practical significance. Don’t write too much helloworld-level code, let alone go overboard and create some weird test programs, and pay more attention to real-world problems. .
The above is php - is my understanding correct? The reason why $b outputs 1 is because $a defaults to 0? For more related content, please pay attention to the PHP Chinese website (www.php.cn)!