private function strConst($number) {
        static $lookup;
        if (!$lookup) {
            $lookup = array();
            $r = new ReflectionClass('HTML5_TreeBuilder');
            $consts = $r->getConstants();
            foreach ($consts as $const => $num) {
                if (!is_int($num)) continue;
                $lookup[$num] = $const;
            }
        }
        return $lookup[$number];
    }