xref: /PHP-7.4/ext/curl/tests/curl_basic_009.phpt (revision 9439d65f)
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 = substr(uniqid(),0,7)."://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--EXPECTF--
22string(%d) "%Srotocol%s"
23int(1)
24