1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 03:03:26 +02:00
Files
archived-php-src/ext/simplexml/tests/022.phpt
T
Dmitry Stogov d0944d74f4 Unicode support
2005-08-16 15:09:51 +00:00

39 lines
636 B
PHP
Executable File

--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===
--UEXPECTF--
object(SimpleXMLElement)#%d (0) {
}
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(11) "slide_*.xml"
}
===DONE===