PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
They are both essentially the same, so it depends on other factors which one you might use. The first extracts the values into the current scope which is what some template systems do. The second overwrites the original values which prevents you from accessing them -- which can be good and bad depending on need. And is it not clear what your ValidateOutput() function does. Usually you validate input based on specific rules for each variable, and then escape output depending on destination.