August 2000
Intermediate to advanced
800 pages
13h 15m
English
An operator is a symbol that tells PHP to perform a mathematical or logical operation. Some operators expect two arguments, some only one. Most operators fall into three categories: arithmetic, logical, and bitwise. There are some exceptions, however. Table 2.4 lists the arithmetic operators.
| Operator | Operation It Performs |
|---|---|
| + | Addition |
| - | Subtraction and Negation |
| * | Multiplication |
| / | Division |
| % | Modulo Division |
| ++ | Increment |
| -- | Decrement |
Addition, subtraction, multiplication, and division are familiar concepts. They may be applied to integers or doubles. Using a string with an arithmetic operator causes the string to be converted to a number first. Modulo division returns the integer remainder of a division. The - operator ...
Read now
Unlock full access