xref: /PHP-5.4/ext/simplexml/tests/016a.phpt (revision 610c7fbe)
1--TEST--
2SimpleXML: concatenating attributes
3--SKIPIF--
4<?php if (!extension_loaded("simplexml")) print "skip"; ?>
5--FILE--
6<?php
7$xml =<<<EOF
8<people>
9   <person name="Foo"></person>
10</people>
11EOF;
12
13$people = simplexml_load_string($xml);
14var_dump($people->person['name']);
15$people->person['name'] .= 'Bar';
16var_dump($people->person['name']);
17
18?>
19===DONE===
20--EXPECTF--
21object(SimpleXMLElement)#%d (1) {
22  [0]=>
23  string(3) "Foo"
24}
25object(SimpleXMLElement)#%d (1) {
26  [0]=>
27  string(6) "FooBar"
28}
29===DONE===
30