How PHP Assign by Value Works, What is PHP Assign by Reference, Learn Assign by Value and Reference

In this PHP programming video, we take a look at How PHP Assign by Value Works, What is PHP Assign by Reference, Learn to Assign by Value and Reference in PHP. In this lesson from Codecademy’s Learn PHP Course, we are in the Associative Arrays section. This lesson is, “Assign by Value or by Reference”. In it we learn that there are two ways to assign 1 variable to another. When we assign by value, this will create two variables that hold copies of the same value but will remain independent variable entities. Then we learn about PHP assign by reference. When we use assign by reference in PHP, this will create two variable names (also called aliases) that will point to the exact same space in memory. These cannot be modified separately! Learning how to assign by value works is important. Learning how to assign by reference is important as well. Learning the difference between assigning by value and assigning by reference is most important! Make sure to understand the difference between assign by value and assign by reference in PHP to become a master PHP developer! Thanks for watching How PHP Assign by Value Works, What is PHP Assign by Reference, Learn to Assign by Value and Reference.