1--TEST--
2Unsetting a handler via an empty string should emit a deprecation
3--EXTENSIONS--
4xml
5--FILE--
6<?php
7
8/* Use xml_set_processing_instruction_handler() for generic implementation */
9function dummy() {}
10
11/* Create valid parser */
12$parser = xml_parser_create();
13xml_set_processing_instruction_handler($parser, dummy(...));
14
15try {
16    xml_set_processing_instruction_handler($parser, '');
17} catch (\Throwable $e) {
18    echo $e::class, ': ', $e->getMessage(), PHP_EOL;
19}
20
21?>
22END
23--EXPECTF--
24Deprecated: xml_set_processing_instruction_handler(): Passing non-callable strings is deprecated since 8.4 in %s on line %d
25END
26