What can you do without operators? Not much, if you're trying to do without them in a programming language, and PHP is no exception. On Monday, we barely had time to show you a long list of the operators in PHP. Today, we're going to show you what they do.
In our last tutorial I left you with a giant table full of operators to study. But I know you, and you are a slacker, so instead of making you go back to that previous article like I should, I am going to spot you one and post it here for you again. That and well...it helps increase my word count. All hail laziness!
What it Does
Used for Addition
Used for Subtraction
Used for Multiplication
Used for Dividing
Used for Modulation
Used to increase value by one
Used to decrease value by one
Used to Assign a Value
Used to Add and Assign a Value
Used to Subtract and Assign a Value
Used to Multiply and Assign a Value
Used to Divide and Assign a Value
Used to Modulate and Add a Value
Not Equal To
Greater Than or Equal To
Less Than or Equal To
This is the Logical (AND) Operator that Returns a True Value if All Expressions Being Checked Are True
This is the Logical (OR) Operator that Returns a True Value if Any of the Expressions Being Checked Are True
This is the Logical (NOT) Operator that Returns a True Value if the Expression Being Checked Is Not True
So there you go. No, you aren't having deja vu. That's just a glitch in the Matrix. Like the third part in that movie series. I mean, way to ruin a trilogy. Let's create a third movie and then have the main characters, who have been the focus of the previous two movies, only be in the final installment for like 20 minutes. Don't get me started.