php-src/ext/simplexml/tests/profile03.phpt
Sterling Hughes 7f5b508f26 Add a "profile" of simplexml's expected behaviour in the form of tests.
This will be expanded as issues arise and will be a formal definition
(in code) of simplexml's behaviour.
2004-01-16 20:50:29 +00:00

19 lines
330 B
PHP

--TEST--
SimpleXML [profile]: Accessing an attribute
--SKIPIF--
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
--FILE--
<?php
$root = simplexml_load_string('<?xml version="1.0"?>
<root>
<child attribute="Sample" />
</root>
');
echo $root->child['attribute'];
echo "\n---Done---\n";
?>
--EXPECT--
Sample
---Done---