OK, the last one might be like you proposed, but the previous I'd remove. The reason? 1. short code block (inside {}), 2. it is assignment to the same $user variable.