blob: 08cb908c9c0aa2d07b5f47dc6ebd8c412db89538 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
--TEST--
SimpleXML and attributes inside foreach
--SKIPIF--
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
--FILE--
<?php
$xml =<<<EOF
<?xml version='1.0'?>
<pres><content><file glob="slide_*.xml"/></content></pres>
EOF;
$sxe = simplexml_load_string($xml);
foreach($sxe->content->file as $file)
{
var_dump($file);
var_dump($file['glob']);
}
?>
===DONE===
--EXPECTF--
object(SimpleXMLElement)#%d (0) {
}
object(SimpleXMLElement)#%d (1) {
[0]=>
string(11) "slide_*.xml"
}
===DONE===
|