Flipkart scales its PHP infrastructure through techniques like horizontal scaling using load balancers, optimizing web servers through technologies like PHP-FPM, and employing a Java middleware called fk-w3-agent to offload tasks from PHP like logging, connection pooling, and running statistics. This improves performance by reducing PHP resource usage and allowing parallelization of tasks. High availability is ensured through techniques such as load balancer standby nodes and session affinity configurations.