$response = new Response('Hello World', 200);
$headers = [ 'Content-Type' => 'text/html', 'X-Custom-Header' => 'Custom Value' ]; $response = new Response('Hello World', 200, $headers);In this example, an array of headers is passed as the third parameter to the __construct method. These headers will be set in the HTTP response when the object is sent back to the client. Package/library: The Response __construct method is part of the Symfony HttpFoundation component, which is a set of PHP classes and interfaces for working with HTTP requests and responses in PHP applications.