mirror of
https://github.com/php/php-src.git
synced 2025-08-16 22:18:50 +02:00
Merge branch 'PHP-7.2' into PHP-7.3
This commit is contained in:
commit
409e9ea51d
1 changed files with 5 additions and 3 deletions
|
@ -8,9 +8,10 @@ allow_url_fopen=1
|
||||||
<?php
|
<?php
|
||||||
require 'server.inc';
|
require 'server.inc';
|
||||||
|
|
||||||
|
$timeout = 0.5;
|
||||||
$options = [
|
$options = [
|
||||||
'http' => [
|
'http' => [
|
||||||
'timeout' => '0.1',
|
'timeout' => $timeout,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -20,8 +21,9 @@ $pid = http_server_sleep('tcp://127.0.0.1:12342');
|
||||||
|
|
||||||
$start = microtime(true);
|
$start = microtime(true);
|
||||||
file_get_contents('http://127.0.0.1:12342/', false, $ctx);
|
file_get_contents('http://127.0.0.1:12342/', false, $ctx);
|
||||||
if (microtime(true) - $start >= 0.2) {
|
$diff = microtime(true) - $start;
|
||||||
echo 'FAIL';
|
if ($diff >= 2 * $timeout) {
|
||||||
|
echo "FAIL: $diff\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
http_server_kill($pid);
|
http_server_kill($pid);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue