mirror of
https://github.com/php/php-src.git
synced 2024-10-03 15:56:11 +00:00
a3e906515c
update tests (binary string must be passed to simplexml_load_string)
21 lines
392 B
PHP
Executable File
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===
|