mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
28 lines
529 B
PHP
28 lines
529 B
PHP
--TEST--
|
|
Test curl_error() & curl_errno() function with problematic host
|
|
--CREDITS--
|
|
TestFest 2009 - AFUP - Perrick Penet <perrick@noparking.net>
|
|
--EXTENSIONS--
|
|
curl
|
|
--SKIPIF--
|
|
<?php
|
|
$addr = "www.".uniqid().".invalid";
|
|
if (gethostbyname($addr) != $addr) {
|
|
print "skip catch all dns";
|
|
}
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$url = "http://www.".uniqid().".invalid";
|
|
$ch = curl_init();
|
|
curl_setopt($ch, CURLOPT_URL, $url);
|
|
|
|
curl_exec($ch);
|
|
var_dump(curl_error($ch));
|
|
var_dump(curl_errno($ch));
|
|
?>
|
|
--EXPECTF--
|
|
%s resolve%s
|
|
int(6)
|