$test = '<update tick=100></update>';
$dom = new DOMDocument();
$res = @$dom->loadHTML('<update tick=100></update>');
foreach ($dom->getElementsByTagName('*') as $element) {
echo 'Element: ' . $element->localName . PHP_EOL;
if ($element->hasAttributes()) {
foreach ($element->attributes as $attr) {
echo " Attribute '$attr->nodeName' :: '$attr->nodeValue'" . PHP_EOL;
}
}
}