You can pass more than a single variable to PHP's isset()
. From the docs:
If multiple parameters are supplied then isset() will return true only if all of the parameters are considered set. Evaluation goes from left to right and stops as soon as an unset variable is encountered.