Example 1 — Check the Default Loader
With nothing configured, libxml uses its built-in loader and the function returns null.
<?php
var_dump(libxml_get_external_entity_loader()); How It Works
- No custom loader has been registered in this script.
- libxml_get_external_entity_loader() therefore has nothing to return.
- var_dump() prints NULL.
- This is the default state on PHP 8. 2 and later.

