1
0
mirror of https://github.com/php/php-src.git synced 2026-04-04 22:52:40 +02:00
Files
archived-php-src/ext/simplexml/tests/011.phpt
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00

46 lines
560 B
PHP

--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";
?>
--EXPECT--
===BAR===
bar
===BAZ===
baz1
===BAZ0===
baz1
===BAZ1===
baz2