Take a look at this photo:
In the first case (pass by reference), when the variable is set or changed inside the function, the external variable also changes.
But in the second case(pass by value), changing the variable inside the function has no effect on the external variable.
for read article see this link.