1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 08:42:29 +01:00
Files
archived-php-src/ext/simplexml/tests/020.phpt
Rob Richards a3e906515c add unicode support
update tests (binary string must be passed to simplexml_load_string)
2006-08-08 20:52:45 +00:00

21 lines
392 B
PHP
Executable File

--TEST--
SimpleXML: Attribute compared to string
--SKIPIF--
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
--FILE--
<?php
$doc = simplexml_load_string(b'<root><name attr="foo">bar</name></root>');
print $doc->name["attr"];
print "\n";
if ($doc->name["attr"] == "foo") {
print "Works\n";
} else {
print "Error\n";
}
?>
===DONE===
--EXPECT--
foo
Works
===DONE===