Dan O'Donnell's suggestion needs a third requirement to work as described:
c) No other variables are defined - especially variables that contain potentially sensitive information.
Without that condition the difference between extract() and assigning variables by hand (and the resulting security implications) should be obvious.
The only valid security step there is (b) - but you should be doing that anyway.