If you’re lazy like me, just use Guzzle. It’s a PHP HTTP client that makes curl to PHP conversions way easier. Example:
```php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://example.com', [
'headers' => ['X-Foo' => 'Bar']
]);
```
No more messing with curl options directly.
```php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://example.com', [
'headers' => ['X-Foo' => 'Bar']
]);
```
No more messing with curl options directly.
