docker-php-extension-installer/scripts/tests/swoole

16 lines
430 B
Plaintext
Raw Permalink Normal View History

#!/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);
}