Pergunta de entrevista da empresa Robert Half

Reverse a string in php. Some basic troubleshooting on error output