summaryrefslogtreecommitdiff
path: root/sapi/cli/tests/bug70470.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/cli/tests/bug70470.phpt')
-rw-r--r--sapi/cli/tests/bug70470.phpt6
1 files changed, 1 insertions, 5 deletions
diff --git a/sapi/cli/tests/bug70470.phpt b/sapi/cli/tests/bug70470.phpt
index 0c5fc56591..13b9f2b343 100644
--- a/sapi/cli/tests/bug70470.phpt
+++ b/sapi/cli/tests/bug70470.phpt
@@ -9,11 +9,7 @@ include "skipif.inc";
include "php_cli_server.inc";
php_cli_server_start("var_dump(getAllheaders());");
-$fp = fsockopen(PHP_CLI_SERVER_HOSTNAME, PHP_CLI_SERVER_PORT, $errno, $errmsg, 0.5);
-
-if (!$fp) {
- die("connect failed: " . $errmsg);
-}
+$fp = php_cli_server_connect();
fwrite($fp, "GET / HTTP/1.1\r\n");
fwrite($fp, "Host: " . PHP_CLI_SERVER_HOSTNAME . "\r\n");