xref: /PHP-7.2/ext/libxml/tests/003.phpt (revision 38e47dd0)
1--TEST--
2libxml_use_internal_errors() memory leaks
3--SKIPIF--
4<?php if (!extension_loaded('simplexml')) die('skip'); ?>
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--EXPECTF--
26bool(false)
27bool(true)
28Done
29