PHP Mathematical Assignment Operators, Codecademy Learn PHP, Shorthand Assignment Operators in PHP

In this PHP coding walkthrough, we take a look at PHP Mathematical Assignment Operators, from Codecademy’s Learn PHP course, which is regarding Shorthand Assignment Operators in PHP. This is based on the PHP Numbers section in Codecademy’s Learn PHP course. The lesson is, “Mathematical Assignment Operators”. In it, we learn that there is a short syntax that is available to us when we want to manipulate a number variable by performing some operation on the value first (addition, subtraction, multiplication, division, modulo). We are able to do this a long way, which allows us to add a new value to a variable, but the long way looks something like this ($x=$x+$y), while the short version for doing the same thing looks like this ($x+=$y). Though it may not seem like a big deal to be able to save a couple keyboard strikes, in the long run, it is very beneficial, and it also makes code more readable. Learning how Mathematical Assignment Operators work in PHP is important as you advance in your PHP programming journey. Make sure to practice using mathematical assignment operators in PHP and also make sure you understand how mathematical assignment operators work before moving on. Thanks for watching PHP Mathematical Assignment Operators, Codecademy’s Learn PHP, Shorthand Assignment Operators in PHP.