<?php
header("Content-Type: text/plain; charset=utf-8"); ?>
<?php
$text = <<<TEXT
<b><!-- <i> это комментарий --><div class="1"><x это битый тег и он не считается
TEXT;
echo $text;
$pattern = "/(<([\w]+)[^>]*>)/";
foreach ($new as $k => $v) {
echo "\n";
}
PD9waHAKaGVhZGVyKCJDb250ZW50LVR5cGU6IHRleHQvcGxhaW47IGNoYXJzZXQ9dXRmLTgiKTsKPz4gCjw/cGhwCgptYl9pbnRlcm5hbF9lbmNvZGluZygiVVRGLTgiKTsKJHRleHQgPSA8PDxURVhUCjxiPjwhLS0gPGk+INGN0YLQviDQutC+0LzQvNC10L3RgtCw0YDQuNC5IC0tPjxkaXYgY2xhc3M9IjEiPjx4INGN0YLQviDQsdC40YLRi9C5INGC0LXQsyDQuCDQvtC9INC90LUg0YHRh9C40YLQsNC10YLRgdGPCgpURVhUOwplY2hvICR0ZXh0OwokcGF0dGVybiA9ICIvKDwoW1x3XSspW14+XSo+KS8iOwpwcmVnX21hdGNoX2FsbCgkcGF0dGVybiwgJHRleHQsICRuZXcsIFBSRUdfU0VUX09SREVSKTsKZm9yZWFjaCAoJG5ldyBhcyAkayA9PiAkdikgewogICAgcHJpbnRfcigkbmV3WyRrXVsyXSk7CiAgICBlY2hvICJcbiI7Cn0=