Changed Order of Validation in PHPFunction file