php 7 pass by reference code example
Example: php pass by reference
<?php
function appendToString(&$string)
{
$string .= 'Cool Im appended';
}
$str = 'I am a start and - ';
appendToString($str);
echo $str; // outputs 'I am a start and - Cool Im appended'
?>