mirror of
https://github.com/php/php-src.git
synced 2024-10-19 07:22:40 +00:00
19 lines
330 B
Plaintext
19 lines
330 B
Plaintext
|
--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---
|