Briefly explain the procedure to pass a variable by value in WordPress?

Passing a variable by value in WordPress is similar to as that in C++. We have to just add an ampersand in front of the variable to do the task. $X= &$Y