Expressions, Loops, Conditions
Expressions (Not Facial)
- Smooth Operators
- $dog = 4 + 1;
- $cat = 2 * $dog;
- $hat = $cat / 5;
- $pig = $mouse - 2;
- Precedence
- $moose = ( 2 + 3 ) * 4;
- $mouse = 2 + ( 3 * 4);
- $house = 2 + 3 * 4;
- Even Smoother Operators
- $house = $house + 5;
- $house += 5;
- $house++;
- $house--;
- $chicken = $house % 7;
- The Super Coolest Operator
- $chicken > 9 ? print "That's a lot of chickens" : $chicken--;