xref: /PHP-8.0/ext/simplexml/tests/016a.phpt (revision a555cc0b)
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--EXPECTF--
20object(SimpleXMLElement)#%d (1) {
21  [0]=>
22  string(3) "Foo"
23}
24object(SimpleXMLElement)#%d (1) {
25  [0]=>
26  string(6) "FooBar"
27}
28