1--TEST--
2Test that cloning of Curl objects is supported
3--EXTENSIONS--
4curl
5--FILE--
6<?php
7
8include 'server.inc';
9$host = curl_cli_server_start();
10
11$ch1 = curl_init();
12curl_setopt($ch1, CURLOPT_URL, $host);
13curl_setopt($ch1, CURLOPT_RETURNTRANSFER, 1);
14curl_exec($ch1);
15
16$ch2 = clone $ch1;
17curl_setopt($ch2, CURLOPT_RETURNTRANSFER, 0);
18
19var_dump(curl_getinfo($ch1, CURLINFO_EFFECTIVE_URL) === curl_getinfo($ch2, CURLINFO_EFFECTIVE_URL));
20curl_exec($ch2);
21
22?>
23--EXPECT--
24bool(true)
25Hello World!
26Hello World!
27