blob: cdb7de374d553444594a821ebb5930fd00784851 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
--TEST--
Test curl_copy_handle() with CURLOPT_PROGRESSFUNCTION
--SKIPIF--
<?php include 'skipif.inc'; ?>
--FILE--
<?php
include 'server.inc';
$host = curl_cli_server_start();
$url = "{$host}/get.php";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_NOPROGRESS, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, function() { });
$ch2 = curl_copy_handle($ch);
echo curl_exec($ch), PHP_EOL;
unset($ch);
echo curl_exec($ch2);
?>
--EXPECTF--
Hello World!
Hello World!
Hello World!
Hello World!
|