--TEST-- SimpleXML: Attribute compared to string --SKIPIF-- --FILE-- bar'); print $doc->name["attr"]; print "\n"; if ($doc->name["attr"] == "foo") { print "Works\n"; } else { print "Error\n"; } ?> --EXPECT-- foo Works