mirror of
https://github.com/php/php-src.git
synced 2024-10-19 07:22:40 +00:00
40a3cdd97b
. Fix memleaks . Add tests . Add functions: getNamespaces(), getDocNamespaces() . Fixed var_dump() . Fixed bugs: #35028 XML object fails FALSE test # This plan was decided before 5.1.0 came out with ilia and checked again # just now. The extension currently shows no more memleaks or errors using # the test suite.
48 lines
584 B
PHP
Executable File
48 lines
584 B
PHP
Executable File
--TEST--
|
|
SimpleXML: echo/print
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('simplexml')) print 'skip';
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$xml =<<<EOF
|
|
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
|
<foo>
|
|
<bar>bar</bar>
|
|
<baz>baz1</baz>
|
|
<baz>baz2</baz>
|
|
</foo>
|
|
EOF;
|
|
|
|
$sxe = simplexml_load_string($xml);
|
|
|
|
echo "===BAR===\n";
|
|
echo $sxe->bar;
|
|
echo "\n";
|
|
|
|
echo "===BAZ===\n";
|
|
echo $sxe->baz;
|
|
echo "\n";
|
|
|
|
echo "===BAZ0===\n";
|
|
echo $sxe->baz[0];
|
|
echo "\n";
|
|
|
|
echo "===BAZ1===\n";
|
|
print $sxe->baz[1];
|
|
echo "\n";
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
===BAR===
|
|
bar
|
|
===BAZ===
|
|
baz1
|
|
===BAZ0===
|
|
baz1
|
|
===BAZ1===
|
|
baz2
|
|
===DONE===
|