PHP【static $a】的使用

				
				function zdy(){
					static $message = 0;
					$message += 1;
					echo $message." ";
				}
				function zdy1(){
					$message = 0;
					$message += 1;
					echo $message." ";
				}
				for ($i = 0; $i < 10; $i++) {
					zdy();
				}
				//输出1 2 3 4 5 6 7 8 9 10
				for ($i = 0; $i < 10; $i++) {
					zdy1();
				}
				//输出1 1 1 1 1 1 1 1 1 1
				
			

PHP【''、""、\、{}】的使用

				
										$a = 5;
					$b = 10;
					echo "$a + $b = ".($a + $b);
					//输出 5 + 10 = 15
					echo "\$a + \$b = ".($a + $b);
					//输出 $a + $b = 15
					echo "{$a} + {$b} = ".($a + $b);
					//输出 5 + 10 = 15
					echo '$a + $b = '.($a + $b);
					//输出 $a + $b = 15				
			

PHP【++,--】的使用

				
										$a = 5;
					$b = 10;
					echo "\$a++ = ".$a++;
					//输出 $a++ = 5
					echo "\$a = ".$a;
					//输出 $a = 6
					echo "++\$a = ".++$a;
					//输出 ++$a = 7
					echo "\$a = ".$a;
					//输出 $a = 7
					echo "\$b-- = ".$b--;
					//输出 $b-- = 10
					echo "\$b = ".$b;
					//输出 $b = 9
					echo "--\$b = ".--$b;
					//输出 --$b = 8
					echo "\$b = ".$b;
					//输出 $b = 8				
			

PHP【&&、||】短路计算的使用

				
										$a = 1;
					$b = 2;
					$c = 3;
					$a < $b && ($a = $c);
					echo $a;
					//输出 $a = 3					
					$a = 1;
					$b = 2;
					$c = 3;
					$a < $b || ($a = $c);
					echo $a;
					//输出 $a = 1
					//总结,当需要条件为true时执行,使用"&&",否则使用"||"。