diff options
author | Nikita Popov <nikic@php.net> | 2016-08-30 10:54:31 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2016-08-30 10:54:31 +0200 |
commit | 07cc6a6ba2d8cebe2b375353491a26953b250149 (patch) | |
tree | d78a50442169fdec1fc998a5e836127505e26317 /ext/simplexml/tests | |
parent | b5f2f6fbd802ad3bc4fb37185e9e776bb089db56 (diff) | |
download | php-git-07cc6a6ba2d8cebe2b375353491a26953b250149.tar.gz |
Fix bug #72971
Diffstat (limited to 'ext/simplexml/tests')
-rw-r--r-- | ext/simplexml/tests/bug72971.phpt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ext/simplexml/tests/bug72971.phpt b/ext/simplexml/tests/bug72971.phpt new file mode 100644 index 0000000000..ff7ded02ef --- /dev/null +++ b/ext/simplexml/tests/bug72971.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #72971: SimpleXML isset/unset do not respect namespace +--SKIPIF-- +<?php if (!extension_loaded("simplexml")) print "skip simplexml extension is not loaded"; ?> +--FILE-- +<?php + +$xml = new SimpleXMLElement('<root xmlns:ns="ns"><foo>bar</foo><ns:foo>ns:bar</ns:foo><ns:foo2>ns:bar2</ns:foo2></root>'); +var_dump(isset($xml->foo2)); +unset($xml->foo); +var_dump($xml->children('ns')); + +?> +--EXPECT-- +bool(false) +object(SimpleXMLElement)#2 (2) { + ["foo"]=> + string(6) "ns:bar" + ["foo2"]=> + string(7) "ns:bar2" +} |