diff options
Diffstat (limited to 'ext/libxml/tests/003.phpt')
-rw-r--r-- | ext/libxml/tests/003.phpt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ext/libxml/tests/003.phpt b/ext/libxml/tests/003.phpt new file mode 100644 index 0000000..dcf6c0b --- /dev/null +++ b/ext/libxml/tests/003.phpt @@ -0,0 +1,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 |