PHP Conference Fukuoka 2025

xml_parser_free

(PHP 4, PHP 5, PHP 7, PHP 8)

xml_parser_freeFree an XML parser

Увага

This function has been DEPRECATED as of PHP 8.5.0. Relying on this function is highly discouraged.

Опис

#[\Deprecated]
xml_parser_free(XMLParser $parser): bool

Зауваження:

Ця функція ні на що не впливає. До PHP 8.0.0, вона використовувалася для закриття ресурсу.

Frees the given XML parser.

Застереження

In addition to calling xml_parser_free() when the parsing is finished, prior to PHP 8.0.0, it was necessary to also explicitly unset the reference to parser to avoid memory leaks, if the parser resource is referenced from an object, and this object references that parser resource.

Параметри

parser
A reference to the XML parser to free.

Значення, що повертаються

Повертає true у разі успіху або false в разі помилки.

Журнал змін

Версія Опис
8.5.0 This function has been deprecated.
8.0.0 Тепер параметр parser має бути примірником XMLParser. Раніше очікувався xml-resource.
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top