What is Guzzle HTTP Client in PHP?
Why Interviewers Ask This
This tests whether you can apply PHP knowledge to real-world scenarios. Interviewers are looking for clarity of thought and evidence that you've encountered this in production code.
Answer
Guzzle is the most popular PHP HTTP client library, installed via Composer. It provides a clean API for making HTTP requests to external APIs and services. Basic GET request: $client = new \GuzzleHttp\Client(); $response = $client->get("https://api.example.com/users");. POST with JSON body: $client->post($url, ["json" => $data]);. It supports: async requests ($client->getAsync() returns a Promise), middleware (for logging, retrying, authentication), request options (headers, timeout, authentication), and PSR-7 request/response objects. Guzzle is used internally by most PHP SDK libraries (AWS SDK, Stripe PHP SDK, etc.) and is a standard tool for any PHP application that makes external HTTP calls.
Pro Tip
Back up your answer with a specific project or situation. Saying 'In my last PHP project, I used this when...' immediately makes your answer more credible and memorable.