1--TEST--
2null returned by resolver function
3--EXTENSIONS--
4libxml
5dom
6--FILE--
7<?php
8
9libxml_set_external_entity_loader(function ($public_id, $system_id, $context) {
10    var_dump($public_id, $system_id, $context);
11    return null;
12});
13
14$doc = new DOMDocument();
15$doc->loadHTMLFile("foobar");
16
17?>
18--EXPECTF--
19NULL
20string(6) "foobar"
21array(4) {
22  ["directory"]=>
23  NULL
24  ["intSubName"]=>
25  NULL
26  ["extSubURI"]=>
27  NULL
28  ["extSubSystem"]=>
29  NULL
30}
31
32Warning: DOMDocument::loadHTMLFile(): Failed to load external entity because the resolver function returned null in %s on line %d
33