I just read this [answer by Bill Karwin](https://stackoverflow.com/questions/3261228/convert-flat-array-to-the-multi-dimentional).

Note that the `$node` is pass by reference.

I always thought that variable created there is only ever temporary and exists only until the end of the loop (or maybe it remains set to the last iteration - I have not tested it).

So, what are the advantages of making it pass by reference?

I'm sure there is one, but I can't figure it out yet.