helly Tue Dec 16 14:49:34 2003 EDT Added files: /php-src/ext/simplexml/tests 011.phpt Log: Add test for string conversion capabilities when used with echo/print.
Index: php-src/ext/simplexml/tests/011.phpt +++ php-src/ext/simplexml/tests/011.phpt --TEST-- SimpleXML and echo/print --SKIPIF-- <?php if (!extension_loaded('simplexml')) print 'skip'; if (!class_exists('RecursiveIteratorIterator')) print 'skip RecursiveIteratorIterator not available'; ?> --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=== Array ===BAZ0=== baz1 ===BAZ1=== baz2 ===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php