In PHP, use &$ in function parameter to pass reference parameters.
Example
The PHP code is as follows
<!DOCTYPE html>
<html>
<body>
<?php
function referenceDemo(&$number){
$number=$number+100;
return $number;
}
$number=900;
echo "The actual value is=",$number,"<br>";
$result=referenceDemo($number);
echo "The modified value is=",$result;
?>
</body>
</html>Output
This will produce the following output
The actual value is=900 The modified value is=1000