xref: /PHP-8.1/ext/libxml/tests/003.phpt (revision 74859783)
1--TEST--
2libxml_use_internal_errors() memory leaks
3--EXTENSIONS--
4simplexml
5--FILE--
6<?php
7var_dump(libxml_use_internal_errors(true));
8
9$xmlstr = <<< XML
10<?xml version='1.0' standalone='yes'?>
11    <movies>
12        <movie>
13            <titles>PHP: Behind the Parser</title>
14        </movie>
15    </movies>
16XML;
17
18simplexml_load_string($xmlstr);
19
20// test memleaks here
21var_dump(libxml_use_internal_errors(false));
22
23echo "Done\n";
24?>
25--EXPECT--
26bool(false)
27bool(true)
28Done
29