I just checked HostGator's web site and it says (on their Compare Hosting Plans page when you click the ? beside PHP 5) that they only have php Version 5.2.0 running, nothing newer.
If you know how to use phpinfo, you can check yourself. If not, you should open a Support question at HostGator to confirm the version of php on the account you are using.