How to Use Assign by Reference, PHP Assign by Reference Explained, Codecademy PHP Variable Alias

In this PHP coding practice, we take a look at, How to Use Assign by Reference, PHP Assign by Reference Explained, Codecademy PHP Variable Alias. We learn that when we assign by reference we are saying that our variable on the left of the operator should point, or refer, to the same data as a variable on the right. When we use assignment by reference, changes that are made to one variable will affect the other. We learn a good use case where assignment by reference might make some sense. Imagine you inherit some code from a previous project developer, but the variables they created throughout the project aren’t named very great. We are able to create a better-named variable and use assignment by reference to link the 2 variables to point to the same address in memory. Learning how to use assignments by reference in PHP is fundamental in your PHP programming path! Make sure to practice using assign by reference with PHP! Understanding how assignment by reference works in PHP can take little time with a bit of practice. Make sure to search online for examples that use assignment by reference with PHP to really help embed the concepts of assignment by reference. Thanks for watching How to Use Assign by Reference, PHP Assign by Reference Explained, Codecademy PHP Variable Alias.