src/Peach/Markup/NameValidator.php
private static function validateNameStartChar($codepoint)
    {
        // @codeCoverageIgnoreStart
        static $range = null;
        if ($range === null) {
            $first = new NameValidator_Range(0x61, 0x7A); // a-z
            $range = $first
                    ->add(0x41, 0x5A)->add(0x3A)->add(0x5F) // A-Z, ":", "_"
                    ->add(0xC0, 0xD6)->add(0xD8, 0xF6)->add(0xF8, 0x2FF)
                    ->add(0x370, 0x37D)->add(0x37F, 0x1FFF)->add(0x200C, 0x200D)
                    ->add(0x2070, 0x218F)->add(0x2C00, 0x2FEF)->add(0x3001, 0xD7FF)
                    ->add(0xF900, 0xFDCF)->add(0xFDF0, 0xFFFD)->add(0x10000, 0xEFFFF);
        }
        // @codeCoverageIgnoreEnd
        
        return $range->validate($codepoint);
    }
private static function validateNameStartChar($codepoint)
    {
        // @codeCoverageIgnoreStart
        static $range = null;
        if ($range === null) {
            $first = new NameValidator_Range(0x61, 0x7A); // a-z
            $range = $first
                    ->add(0x41, 0x5A)->add(0x3A)->add(0x5F) // A-Z, ":", "_"
                    ->add(0xC0, 0xD6)->add(0xD8, 0xF6)->add(0xF8, 0x2FF)
                    ->add(0x370, 0x37D)->add(0x37F, 0x1FFF)->add(0x200C, 0x200D)
                    ->add(0x2070, 0x218F)->add(0x2C00, 0x2FEF)->add(0x3001, 0xD7FF)
                    ->add(0xF900, 0xFDCF)->add(0xFDF0, 0xFFFD)->add(0x10000, 0xEFFFF);
        }
        // @codeCoverageIgnoreEnd
        
        return $range->validate($codepoint);
    }
指定された Unicode 符号点が NameStartChar の範囲に適合するかどうかを調べます.

@param  int $codepoint Unicode 符号点
@return bool           引数が NameStartChar である場合のみ true