<html>
<head>
<title>Passing Reference to Functions </title>
<body>
<h1>Passing Reference to Functions </h1>
<?php
$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;
}
?>
</body>
</html>
Output:
Others
Languages
Frameworks
Web / Design
Mobile Technology
Sql & Technology
R4R