Php small record symbol function annotation symbol: & nbsp; single line annotation & nbsp; & nbsp; use of multi-line annotation quotation marks & nbsp; & nbsp; & nb php small record symbol function
Annotation symbol:
// Single line annotation
Multiline annotation
Use of quotation marks
''Single quotes, no meaning, can be taken without any processing;
"" Double quotes, php dynamic processing and output, usually used for variables.
Variable form:
True is True;
The other is False.
Common variables:
String (numbers, Chinese characters, etc)
Integer (1, 2, 3, 4, 5, 0,-1,-2, and so on)
Double floating point number (decimal point)
Array
Object
Common symbols
\ "Double quotation marks
\ Backslash
\ N line feed
\ R output
\ T hop (TAB)
Operator Number
+ Addition operation-subtraction operation
* Multiplication/Division
% Get remainder + + accumulate
-- Accumulate 1. add strings
Set operation
= Place the value on the right to the left (Yes)
+ = Add the right value to the left
-= Reduce the value on the right to the left
* = Multiply the value on the left by the value on the right.
/= Divide the value on the left by the value on the right
. = Add the string on the right to the left
Bitwise operator
&
| Or
^ Exclusive (xor)
<Shift left
> Shift to the right
~ 1 Population
Logical operation
<Less> greater
<= Less than or equal to> = greater than or equal
! = Not equal to & and
| Or! No
Other operators
$ Variable symbol
& Variable indicators (before a variable)
@ Do not display the error message (before the function)
-> Object methods or attributes
=> Array element value
? : Ternary operator
PHP @, symbol meaning
@ Before the function, the error message is not displayed.
Function foo ($ n)
{
$ Result = 1/$ n;
Return $ result;
}
Echo @ foo (0); // The function generates an error except 0, but this error is not displayed after @ is added.
Echo "end"; // output end
=> Array element value
$ Attrs = array (
'A' => '1 ',
'B' => '2'
);
Foreach ($ attrs as $ attr => $ values ){
Echo $ attr. "\ n ";
Echo $ values. "\ n ";
}
A
1
B
2