1
0
Fork 0
mirror of https://github.com/mlocati/docker-php-extension-installer synced 2025-05-08 16:17:20 +00:00
docker-php-extension-installer/scripts/tests/swoole
2023-12-13 20:14:33 +01:00

15 lines
430 B
PHP
Executable file

#!/usr/bin/env php
<?php
if (extension_loaded('curl')) {
// This leads to Segmentation fault when the script ends
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://127.0.0.1/foo');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
if (defined('CURLOPT_TIMEOUT_MS')) {
curl_setopt($ch, CURLOPT_TIMEOUT_MS, 1);
} else {
curl_setopt($ch, CURLOPT_TIMEOUT, 1);
}
curl_exec($ch);
}