xref: /php-src/ext/curl/tests/curl_basic_009.phpt (revision 0e843c5d)
1--TEST--
2Test curl_error() & curl_errno() function with problematic protocol
3--CREDITS--
4TestFest 2009 - AFUP - Perrick Penet <perrick@noparking.net>
5--EXTENSIONS--
6curl
7--FILE--
8<?php
9
10// Make sure the scheme always starts with an alphabetic character.
11$url = 'a' . substr(uniqid(),0,6)."://www.example.com";
12$ch = curl_init();
13curl_setopt($ch, CURLOPT_URL, $url);
14
15curl_exec($ch);
16var_dump(curl_error($ch));
17var_dump(curl_errno($ch));
18curl_close($ch);
19
20
21?>
22--EXPECTF--
23string(%d) "%Srotocol%s"
24int(1)
25