Yes, you have to tell the function you want to pass this parameter by REFERENCE, as opossed to VALUE passing.
When you pass by value (like in your func), the program makes a copy of the data, process it inside the function and, unless you tell the func to return that data, it doesn't.
Modify your func declaration like this:
function MyFunc($a,&$b){
$b = 3;
}
Then use this:
$a=0;
$b=0;
MyFunc($a,$b);
echo "a value is -->".$a;
echo "b value is -->".$b;
This way, you pass the argument and it gets modified inside the function. If you ever wondered what pointers are, this is a NOT SO GOOD example. But they are used to access the real variable, instead of just the value of it.
Hope this helps
fLIPIS