diff options
Diffstat (limited to 'ext/simplexml/tests/016a.phpt')
-rw-r--r-- | ext/simplexml/tests/016a.phpt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ext/simplexml/tests/016a.phpt b/ext/simplexml/tests/016a.phpt new file mode 100644 index 0000000..9797e29 --- /dev/null +++ b/ext/simplexml/tests/016a.phpt @@ -0,0 +1,29 @@ +--TEST-- +SimpleXML: concatenating attributes +--SKIPIF-- +<?php if (!extension_loaded("simplexml")) print "skip"; ?> +--FILE-- +<?php +$xml =<<<EOF +<people> + <person name="Foo"></person> +</people> +EOF; + +$people = simplexml_load_string($xml); +var_dump($people->person['name']); +$people->person['name'] .= 'Bar'; +var_dump($people->person['name']); + +?> +===DONE=== +--EXPECTF-- +object(SimpleXMLElement)#%d (1) { + [0]=> + string(3) "Foo" +} +object(SimpleXMLElement)#%d (1) { + [0]=> + string(6) "FooBar" +} +===DONE=== |