Chapter 6. Operators


In this chapter, we look at operators, which are the symbols such as + (adding), - (subtracting), and * (multiplying).

Operators are like functions in that they do something with values, but they use symbols rather than function names. In the equation 2 + 3, the 2 and the 3 are both operands, and the + is the operator. There are three types of operators: unary, binary, and ternary, which take one, two, and three operands respectively. As you can see, the + operator (used to add numerical values) is a binary operator, because it takes two variables as input.



PHP in a Nutshell
Ubuntu Unleashed
ISBN: 596100671
EAN: 2147483647
Year: 2003
Pages: 249

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net