mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
21 lines
434 B
PHP
21 lines
434 B
PHP
--TEST--
|
|
Test curl_getinfo() function with CURLINFO_HTTP_CODE parameter
|
|
--CREDITS--
|
|
Jean-Marc Fontaine <jmf@durcommefaire.net>
|
|
--EXTENSIONS--
|
|
curl
|
|
--FILE--
|
|
<?php
|
|
include 'server.inc';
|
|
$host = curl_cli_server_start();
|
|
|
|
$url = "{$host}/get.inc?test=";
|
|
$ch = curl_init();
|
|
curl_setopt($ch, CURLOPT_URL, $url);
|
|
curl_exec($ch);
|
|
var_dump(curl_getinfo($ch, CURLINFO_HTTP_CODE));
|
|
?>
|
|
--EXPECT--
|
|
Hello World!
|
|
Hello World!int(200)
|