1--TEST--
2Test trampoline for curl option CURLOPT_HEADERFUNCTION
3--EXTENSIONS--
4curl
5--FILE--
6<?php
7
8class TrampolineTest {
9    public function __call(string $name, array $arguments) {
10        echo 'Trampoline for ', $name, PHP_EOL;
11	    return CURL_PUSH_OK;
12    }
13}
14$o = new TrampolineTest();
15$callback = [$o, 'trampoline'];
16
17include 'server.inc';
18$host = curl_cli_server_start();
19
20$ch = curl_init();
21curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
22curl_setopt($ch, CURLOPT_HEADERFUNCTION, $callback);
23curl_setopt($ch, CURLOPT_URL, $host);
24curl_exec($ch);
25
26?>
27--EXPECT--
28Trampoline for trampoline
29