xref: /PHP-7.3/ext/curl/tests/curl_basic_008.phpt (revision 782352c5)
1--TEST--
2Test curl_error() & curl_errno() function with problematic host
3--CREDITS--
4TestFest 2009 - AFUP - Perrick Penet <perrick@noparking.net>
5--SKIPIF--
6<?php
7	if (!extension_loaded("curl")) print "skip";
8	$addr = "www.".uniqid().".".uniqid();
9	if (gethostbyname($addr) != $addr) {
10		print "skip catch all dns";
11	}
12?>
13--FILE--
14<?php
15
16$url = "http://www.".uniqid().".".uniqid();
17$ch = curl_init();
18curl_setopt($ch, CURLOPT_URL, $url);
19
20curl_exec($ch);
21var_dump(curl_error($ch));
22var_dump(curl_errno($ch));
23curl_close($ch);
24
25
26?>
27--EXPECTF--
28%s resolve%s
29int(6)
30