PHP braces { } writing rules
Write structure control code in the program, such as if, for, while, switch and other structures. There are two traditional writing habits of braces, which are as follows:
a. {Follow directly after the control statement without line breaks, such as
for ($i=0;$i<$count;$i++) { echo "test"; }
b. {In the next line of the control statement, such as
for($i=0;$i<$count;$i++){ echo "test"; }
, a is the method recommended by PEAR, but in terms of actual writing, this does not affect the specification of the program and the use of phpdoc to implement the document, so You can use the above two methods according to your personal habits, but you are required to use only one of them in the same program to avoid reading inconvenience.