xref: /PHP-8.0/ext/libxml/tests/003.phpt (revision ac282a90)
1--TEST--
2libxml_use_internal_errors() memory leaks
3--SKIPIF--
4<?php if (!extension_loaded('simplexml')) die('skip simplexml extension not available'); ?>
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