Indeed, if you start them with something like
#!/usr/bin/php
or whatever the appropriate version is for your system and interpreter, the operating system will automatically run that interpreter (instead of bash) to interpret the script. For example, Python scripts often start with
#!/usr/bin/python
or
#!/usr/bin/env python
and they could be run directly as hooks without having a shell script in between.