blob: dcf6c0bb65d69a54948e916a50911f0adebc080b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
--TEST--
libxml_use_internal_errors() memory leaks
--SKIPIF--
<?php if (!extension_loaded('simplexml')) die('skip'); ?>
--FILE--
<?php
var_dump(libxml_use_internal_errors(true));
$xmlstr = <<< XML
<?xml version='1.0' standalone='yes'?>
<movies>
<movie>
<titles>PHP: Behind the Parser</title>
</movie>
</movies>
XML;
simplexml_load_string($xmlstr);
// test memleaks here
var_dump(libxml_use_internal_errors(false));
echo "Done\n";
?>
--EXPECTF--
bool(false)
bool(true)
Done
|