In this episode, you are going to do an experiment to discover the answers and see how the operator precedence actually works. When you combine complex expressions together, each expression is evaluated following the operator precedence. However, which side of the expression is evaluated first? And if one part is
false what happens to the other parts?
It’s important that you know how your conditional expressions will be evaluated and in what order to ensure you do not get unexpected behavior.
Before you get started on this part of the lab, make sure you have watched the videos in Docx for the operator precedence. These will prepare you for the experiment you are going to do here.
Whew, you did it! Excellent job! You are now the Grand Poobah of PHP Conditional Expressions. Go forth and build some awesome code!
Who needs copy/paste? Right. Writing code from scratch is fun!
Total Lab Runtime: 01:07:16
- 1 Anatomy of a Conditional Expressionfree 04:58
- 2 Falsey Conditional Expressionbasic 09:15
- 3 Functions in the Conditional Expressionbasic 11:04
- 4 Assignment in the Conditional Expressionbasic 08:42
- 5 Operator Truth Tablesbasic 05:56
- 6 Logical Operator Experimentpro 13:21
- 7 Operator Precedence Experimentpro 14:00