mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
For rationale, see #6787 Extensions migrated in part 4: * simplexml * skeleton * soap * spl * sqlite3 * sysvmsg * sysvsem * tidy - also removed a check for an ancient dependency version
20 lines
324 B
PHP
20 lines
324 B
PHP
--TEST--
|
|
SimpleXML: Attribute compared to string
|
|
--EXTENSIONS--
|
|
simplexml
|
|
--FILE--
|
|
<?php
|
|
|
|
$doc = simplexml_load_string('<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";
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
foo
|
|
Works
|