Sonar is a platform for continuously inspecting code quality to detect issues, ensure technical debt is under control, and monitor code complexity, duplications, and potential bugs. It provides visual reporting across projects and allows tracking metrics over time. Sonar supports PHP projects using tools like PHP_Codesniffer, PHPUnit, PHP Depend, and PHP Mess Detector. It can be set up with Maven and integrated with Hudson via a plugin or phpUnderControl via Ant tasks to run analysis as part of the continuous integration build process.