--TEST--
SimpleXML: Attribute creation
--SKIPIF--
--FILE--
EOF;
$sxe = simplexml_load_string($xml);
$sxe[""] = "warning";
$sxe["attr"] = "value";
echo $sxe->asXML();
$sxe["attr"] = "new value";
echo $sxe->asXML();
$sxe[] = "error";
__HALT_COMPILER();
?>
===DONE===
--EXPECTF--
Warning: main(): Cannot write or create unnamed attribute in %s012.php on line %d
Fatal error: Uncaught Error: Cannot create unnamed attribute in %s012.php:%d
Stack trace:
#0 {main}
thrown in %s012.php on line %d