PHP libxml_use_internal_errors() Function

The libxml_use_internal_errors — Disable libxml errors and allow user to fetch error information as needed.

The libxml_use_internal_errors() function disables standard libxml errors and enables user error handling.This function returns the previous value of the use_lib_errors parameter.

bool libxml_use_internal_errors ([ bool $use_errors = FALSE ] )

libxml_use_internal_errors() allows you to disable standard libxml errors and enable user error handling.

Example -

This example demonstrates the basic usage of libxml errors and the value returned by this function.

The above example will output : -

bool(false)

ParameterDescription
use_errorsEnable (TRUE) user error handling or disable (FALSE) user error handling. Disabling will also clear any existing libxml errors.

This function returns the previous value of use_errors.