xref: /PHP-7.0/ext/curl/tests/curl_basic_019.phpt (revision 41b655d9)
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.php?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===DONE===
22--EXPECTF--
23Hello World!
24Hello World!bool(true)
25===DONE===
26