PHP Programing language

How Can Passing by Reference
Previous Home Next
When you pass data to a function, what's really passed is a copy of that data. So, for example, if you pass a variable, a copy is made of that variable, and that copy is actually passed to the function.

For example:

<title>Passing Reference to Functions </title>
<h1>Passing Reference to Functions </h1>
$value = 4;
echo "Before the call, \$value holds $value <br>";
squarer ($value);
echo "After the call, \$value holds $value <br>";
function squarer (&$number)
$number *= $number;



Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Comment / Feedback: