/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/xml/tests/set_handler_deprecation_empty_string.phpt
25 строк
620 B
Gina Peter Bnayard
ext/xml: Add an explicit test case about unsetting a handler with empty string
11 авг 2024, 16:00
11 авг 2024, 16:00
caae950
Код
Авторство
О чём код?
--TEST-- Unsetting a handler via an empty string should emit a deprecation --EXTENSIONS-- xml --FILE-- <?php /* Use xml_set_processing_instruction_handler() for generic implementation */ function dummy() {} /* Create valid parser */ $parser = xml_parser_create(); xml_set_processing_instruction_handler($parser, dummy(...)); try { xml_set_processing_instruction_handler($parser, ''); } catch (\Throwable $e) { echo $e::class, ': ', $e->getMessage(), PHP_EOL; } ?> END --EXPECTF-- Deprecated: xml_set_processing_instruction_handler(): Passing non-callable strings is deprecated since 8.4 in %s on line %d END