What is Pass By Reference in PHP, Pass By Reference Explained, Learn PHP Codecademy, Parameter Alias

Channel:
Subscribers:
7,740
Published on ● Video Link: https://www.youtube.com/watch?v=v9ahCwpWvIM



Duration: 4:10
189 views
5


In this free PHP programming course we are taking a look at What is Pass By Reference in PHP, Pass By Reference Explained, Learn PHP Codecademy, Parameter Alias. In this Codecademy section, we are looking at PHP functions, and this lesson specifically goes into pass by reference. We learn that we are able to invoke functions with values directly or variables. When a function is invoked with a variable as its argument, it's like we are assigning the value that variable holds the function's parameter. In essence, we are assigning a copy of our variable's value. When we do this, the argument and variable are distinct entities. This means any changes that are made in the function to the parameter, are not going to affect the variable that we pass in. If we want the changes to be permanent, we can prepend the parameter name with the "&" (reference sign). When we do this, we assign the parameter to be an alias for our argument variable. This means that both the parameter and variable will point to the same spot in memory. This will allow any changes made to the parameter within our function, to permanently change the variable as well. Learn to pass by reference to master PHP programming. Practice pass by reference to truly understand how it works. Understand pass by reference to master programming. Thanks for watching What is Pass By Reference in PHP, Pass By Reference Explained, Learn PHP Codecademy, Parameter Alias.




Other Videos By We Will Code


2022-05-03Generating Random Numbers in PHP, Random Number Function with PHP, Learn to Generate Random Numbers
2022-05-02Working With Number Functions in PHP, abs PHP Function for Calculate Absolute Value, Round Function
2022-05-02Working with Substrings in PHP, Substring Built-In Functions, Find Matching String in PHP Codecademy
2022-05-02Different Built-In PHP String Functions Explained, Learn PHP Functions for Strings, Codecademy PHP
2022-05-02New JLAB Talk Go Microphone, Most Affordable Good Quality Vocal Microphone, Clear Vocal Microphone
2022-04-30Working with Variables in PHP, gettype function, PHP var_dump function, Learn PHP Built-In Functions
2022-04-25Is Echo a Function in PHP, Constructs Vs Functions in PHP, Echo is Not a Function, PHP Did You Know
2022-04-25Intro to Built-In PHP Functions, How to Use Built-In PHP Functions, Built-In Functions in PHP Guide
2022-04-24Review of PHP Functions, Intro to PHP Functions, Review, Create a PHP Function, Invoke a Function
2022-04-22How Variable Scope Works in PHP, Variable Scope Explained, Local vs Global Scope, PHP Function Scope
2022-04-21What is Pass By Reference in PHP, Pass By Reference Explained, Learn PHP Codecademy, Parameter Alias
2022-04-21Default Parameters in PHP, Default Parameters in Functions, PHP on Codecademy PHP Default Arguments
2022-04-20Multiple Parameters in PHP, Using Multiple Function Parameters in PHP, Codecademy Learn PHP Coding
2022-04-19Function Parameters Explained, What are Parameters and Arguments in PHP, Passing in Arguments in PHP
2022-04-19What is Null in PHP, Returning Null Explained in PHP, Null Values in Programming, Codecademy PHP
2022-04-19PHP Function Return Values, PHP Return Values Explained, Codecademy PHP, Understand Return Values
2022-04-19More on Return Statements, PHP Codecademy Free Programming Course, PHP Return Keyword, PHP Functions
2022-04-19Return Statements Explained, What is a Return Statement in PHP, Codecademy PHP, Return Statements
2022-04-18Invoking Functions Explained in PHP, How to Invoke a Function in PHP, Function Invocation Codecademy
2022-04-18Defining Functions in PHP, How to Define a Function in PHP, Codecademy Learn PHP, Create A Function
2022-04-18Intro to PHP Functions, Learn PHP on Codecademy, Intro to PHP Functions, What are Functions in PHP



Tags:
Coding
Learn PHP
PHP
Programming
Server-side
back-end
code tutorial
tutorials