Describe a time you found and fixed a performance problem in a PHP application.
Tell it as measurement, diagnosis, fix, verification — and be specific about which layer was slow, because the causes are different.
- How you found it. Slow request logs, an APM tool such as New Relic or Blackfire, or the MySQL slow query log. Say what the actual number was.
- Where the time was going. In most PHP applications it is the database, not PHP. Profiling with Xdebug or Blackfire tells you rather than leaving you to guess.
- The fix. Common high-value ones: eliminating an N+1 query by eager loading, adding a missing index, caching an expensive computation in Redis, enabling OPcache, or moving a slow third-party call into a queued job.
- What it bought you, and the monitoring you added so it would not silently regress.
Note: The most impressive version of this story involves resisting a premature optimisation — measuring first and discovering the bottleneck was somewhere nobody expected. Interviewers hear "I optimised the loop" constantly and "I measured and the loop was irrelevant" rarely.





