xref: /PHP-8.0/ext/curl/tests/curl_basic_019.phpt (revision a555cc0b)
1--TEST--
2Test curl_getinfo() function with CURLINFO_EFFECTIVE_URL parameter
3--CREDITS--
4Jean-Marc Fontaine <jmf@durcommefaire.net>
5--SKIPIF--
6<?php include 'skipif.inc'; ?>
7--FILE--
8<?php
9  include 'server.inc';
10  $host = curl_cli_server_start();
11
12  $url = "http://{$host}/get.inc?test=";
13  $ch  = curl_init();
14
15  curl_setopt($ch, CURLOPT_URL, $url);
16  curl_exec($ch);
17  $info = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
18  var_dump($url == $info);
19  curl_close($ch);
20?>
21--EXPECT--
22Hello World!
23Hello World!bool(true)
24