1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 00:48:25 +02:00
Files
archived-php-src/ext/curl/tests/curl_basic_009.phpt
Ilija Tovilo 0e843c5d82 Fix EXPECT for bug52820.phpt on newer curl versions
New curl versions have a "processing: url" line. The connection number in
"Closing connection" is apparently also dropped.
2023-08-10 15:51:53 +02:00

25 lines
503 B
PHP

--TEST--
Test curl_error() & curl_errno() function with problematic protocol
--CREDITS--
TestFest 2009 - AFUP - Perrick Penet <perrick@noparking.net>
--EXTENSIONS--
curl
--FILE--
<?php
// Make sure the scheme always starts with an alphabetic character.
$url = 'a' . substr(uniqid(),0,6)."://www.example.com";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_exec($ch);
var_dump(curl_error($ch));
var_dump(curl_errno($ch));
curl_close($ch);
?>
--EXPECTF--
string(%d) "%Srotocol%s"
int(1)