<?php
function foo(&$referencia) {
$referencia *= 1002;
}
$valorinicial = 2;
foo($valorinicial);
//Note que aqui o valor foi alterado
echo $valorinicial;
PD9waHAKCmZ1bmN0aW9uIGZvbygmJHJlZmVyZW5jaWEpIHsKICAgICRyZWZlcmVuY2lhICo9IDEwMDI7Cn0KCiR2YWxvcmluaWNpYWwgPSAyOwoKZm9vKCR2YWxvcmluaWNpYWwpOwoKLy9Ob3RlIHF1ZSBhcXVpIG8gdmFsb3IgZm9pIGFsdGVyYWRvCmVjaG8gJHZhbG9yaW5pY2lhbDs=