User login

Comments

And they even bothered to put an ‘&’ in front of it. lol. I don’t get it either.

A couple other things make this doubly weird. This is the main function call for the project. The variable that they pass is the equivalent of my calling test($hello). I only used test($world) in the example above to demonstrate what is happening to the variable.

A programmer was probably debugging and got distracted (I hope raspberry). The PHP behavior wasn’t exactly what I expected since the variable was passed by reference. Instead two copies of the variable were made available, with the global one taking precedence.

This looks like php4 code, imho. Of course, it’s simplified. But explicitly passing by reference is no longer necessary in most cases in php >= 5.0.

Add new comment