Site icon Learn Web Development & Programming, Artificial Intelligence, WordPress, Shopify Articles

What will be the output of following?

function changevalue(&$y){

$y=$y+7;

}

$num=8;

changevalue($num);

echo $num;

It would be: 15
Reference will take the value and will add 5 to it.

Exit mobile version