xref: /PHP-7.2/ext/curl/tests/curl_basic_009.phpt (revision e27301c7)
1--TEST--
2Test curl_error() & curl_errno() function with problematic protocol
3--CREDITS--
4TestFest 2009 - AFUP - Perrick Penet <perrick@noparking.net>
5--SKIPIF--
6<?php if (!extension_loaded("curl")) print "skip"; ?>
7--FILE--
8<?php
9
10$url = uniqid()."://www.".uniqid().".".uniqid();
11$ch = curl_init();
12curl_setopt($ch, CURLOPT_URL, $url);
13
14curl_exec($ch);
15var_dump(curl_error($ch));
16var_dump(curl_errno($ch));
17curl_close($ch);
18
19
20?>
21--EXPECTREGEX--
22string\(\d+\) "([^\r\n]*rotocol[^\r\n]+|Could not resolve host: .+)"
23int\(\d\)
24