├── tests ├── bootstrap.php └── php7ify │ ├── ErrorTest.php │ ├── TypeErrorTest.php │ ├── ParseErrorTest.php │ ├── AssertionErrorTest.php │ ├── ArithmeticErrorTest.php │ ├── DivisionByZeroTest.php │ └── Php7CheckTest.php ├── phpunit.xml ├── src ├── Exceptions │ ├── AssertionError.php │ ├── ParseError.php │ ├── DivisionByZeroError.php │ ├── ArithmeticError.php │ ├── TypeError.php │ └── Error.php ├── Functions │ ├── error_clear_last.php │ ├── intdiv.php │ └── preg_replace_callback_array.php ├── Php7 │ └── Compatibility.php ├── Throwable.php └── IntlChar.php ├── .travis.yml ├── LICENSE ├── composer.json ├── .gitignore └── README.md /tests/bootstrap.php: -------------------------------------------------------------------------------- 1 | add('php7ifytest\\', array($baseDir.'/tests/php7ify/')); 6 | $loader->register(); 7 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | ./tests 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/php7ify/ErrorTest.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * @since 7.0 11 | */ 12 | if (!class_exists('\AssertionError')) 13 | { 14 | class AssertionError extends Error 15 | { 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /tests/php7ify/AssertionErrorTest.php: -------------------------------------------------------------------------------- 1 | 8 | * 9 | * @since 7.0 10 | */ 11 | if (!class_exists('\ParseError')) 12 | { 13 | class ParseError extends Error 14 | { 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tests/php7ify/DivisionByZeroTest.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * @since 7.0 11 | */ 12 | if (!class_exists('\DivisionByZeroError')) 13 | { 14 | class DivisionByZeroError extends Error 15 | { 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Functions/error_clear_last.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * @since 7.0 11 | */ 12 | if (!function_exists('error_clear_last')) 13 | { 14 | function error_clear_last() 15 | { 16 | set_error_handler('var_dump', 0); 17 | @trigger_error(''); 18 | restore_error_handler(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Php7/Compatibility.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * @since 7.0 11 | */ 12 | class Compatibility 13 | { 14 | /** 15 | * @return string 16 | */ 17 | public static function versionString() 18 | { 19 | return phpversion(); 20 | } 21 | 22 | /** 23 | * @return bool 24 | */ 25 | public static function isPhp7() 26 | { 27 | return PHP_MAJOR_VERSION >= 7; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | before_script: 4 | - curl -sS https://getcomposer.org/installer | php 5 | - php composer.phar install --prefer-dist --no-interaction 6 | 7 | matrix: 8 | fast_finish: true 9 | include: 10 | - php: 5.3 11 | dist: precise 12 | - php: 5.4 13 | dist: trusty 14 | - php: 5.5 15 | dist: trusty 16 | - php: 5.6 17 | dist: xenial 18 | - php: 7.0 19 | dist: xenial 20 | - php: 7.1 21 | dist: xenial 22 | - php: 7.2 23 | dist: xenial 24 | - php: 7.3 25 | dist: xenial 26 | - php: 7.4 27 | dist: xenial 28 | 29 | script: 30 | - vendor/bin/phpunit 31 | -------------------------------------------------------------------------------- /src/Exceptions/ArithmeticError.php: -------------------------------------------------------------------------------- 1 | 11 | * 12 | * @since 7.0 13 | */ 14 | if (!class_exists('\ArithmeticError')) 15 | { 16 | class ArithmeticError extends Error 17 | { 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Exceptions/TypeError.php: -------------------------------------------------------------------------------- 1 | 12 | * 13 | * @since 7.0 14 | */ 15 | if (!class_exists('\TypeError')) 16 | { 17 | class TypeError extends Error 18 | { 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/php7ify/Php7CheckTest.php: -------------------------------------------------------------------------------- 1 | = 70000) 12 | { 13 | if (!Compatibility::isPhp7()) 14 | { 15 | throw new \PHPUnit_Framework_Exception('Version check failed. PHP version is ' . PHP_VERSION); 16 | } 17 | } 18 | else 19 | { 20 | if (Compatibility::isPhp7()) 21 | { 22 | throw new \PHPUnit_Framework_Exception('Version check failed. PHP version is ' . PHP_VERSION); 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Functions/intdiv.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * @since 7.0 11 | */ 12 | if (!function_exists('intdiv')) 13 | { 14 | function intdiv($dividend, $divisor) 15 | { 16 | $dividend = (int) $dividend; 17 | $divisor = (int) $divisor; 18 | 19 | if (0 === $divisor) 20 | { 21 | throw new \DivisionByZeroError('Division by zero'); 22 | } 23 | 24 | if (-1 === $divisor && ~PHP_INT_MAX === $dividend) 25 | { 26 | throw new \ArithmeticError('Division of PHP_INT_MIN by -1 is not an integer'); 27 | } 28 | 29 | return ($dividend - ($dividend % $divisor)) / $divisor; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Exceptions/Error.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * @since 7.0 11 | */ 12 | if (!class_exists('\Error')) 13 | { 14 | class Error 15 | extends Exception 16 | implements Throwable 17 | { 18 | /** 19 | * Gets a string representation of the thrown object 20 | * 21 | * @link http://php.net/manual/en/throwable.tostring.php 22 | * @return string

Returns the string representation of the thrown object.

23 | * @since 7.0 24 | */ 25 | public function __toString() 26 | { 27 | return $this->getMessage(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Functions/preg_replace_callback_array.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * @since 7.0 11 | */ 12 | if (!function_exists('preg_replace_callback_array')) 13 | { 14 | function preg_replace_callback_array(array $patterns, $subject, $limit = -1, &$count = 0) 15 | { 16 | $count = 0; 17 | $result = '' . $subject; 18 | if (0 === $limit) 19 | { 20 | return $result; 21 | } 22 | 23 | foreach ($patterns as $pattern => $callback) 24 | { 25 | $result = preg_replace_callback($pattern, $callback, $result, $limit, $c); 26 | $count += $c; 27 | } 28 | 29 | return $result; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Dennis Stücken 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dstuecken/php7ify", 3 | "type": "library", 4 | "description": "php7ify is a project that brings new php7 classes and exceptions to php 5.x.", 5 | "keywords": [ 6 | "php7", 7 | "php 7", 8 | "php 7.0", 9 | "php 7 exceptions", 10 | "exceptions", 11 | "throwable", 12 | "errorexception", 13 | "error" 14 | ], 15 | "minimum-stability": "dev", 16 | "prefer-stable": true, 17 | "require-dev": { 18 | "phpunit/phpunit": "^4.8.36" 19 | }, 20 | "require": { 21 | "php": ">=5.3.0" 22 | }, 23 | "license": "MIT", 24 | "authors": [ 25 | { 26 | "name": "dstuecken", 27 | "email": "dstuecken@me.com" 28 | } 29 | ], 30 | "autoload": { 31 | "classmap": [ 32 | "src/", 33 | "src/Exceptions/" 34 | ], 35 | "files": [ 36 | "src/Functions/preg_replace_callback_array.php", 37 | "src/Functions/error_clear_last.php", 38 | "src/Functions/intdiv.php" 39 | ], 40 | "psr-4": { 41 | "dstuecken\\Php7ify\\": "src/" 42 | } 43 | }, 44 | "autoload-dev": { 45 | "psr-4": { 46 | "php7ifytest\\": "tests/php7ify/" 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | composer.phar 2 | vendor/ 3 | 4 | # Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file 5 | # You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file 6 | # composer.lock 7 | 8 | *.iml 9 | 10 | ## Directory-based project format: 11 | .idea/ 12 | # if you remove the above rule, at least ignore the following: 13 | 14 | # User-specific stuff: 15 | # .idea/workspace.xml 16 | # .idea/tasks.xml 17 | # .idea/dictionaries 18 | 19 | # Sensitive or high-churn files: 20 | # .idea/dataSources.ids 21 | # .idea/dataSources.xml 22 | # .idea/sqlDataSources.xml 23 | # .idea/dynamic.xml 24 | # .idea/uiDesigner.xml 25 | 26 | # Gradle: 27 | # .idea/gradle.xml 28 | # .idea/libraries 29 | 30 | # Mongo Explorer plugin: 31 | # .idea/mongoSettings.xml 32 | 33 | ## File-based project format: 34 | *.ipr 35 | *.iws 36 | 37 | ## Plugin-specific files: 38 | 39 | # IntelliJ 40 | /out/ 41 | 42 | # mpeltonen/sbt-idea plugin 43 | .idea_modules/ 44 | 45 | # JIRA plugin 46 | atlassian-ide-plugin.xml 47 | 48 | # Crashlytics plugin (for Android Studio and IntelliJ) 49 | com_crashlytics_export_strings.xml 50 | crashlytics.properties 51 | crashlytics-build.properties 52 | composer.lock 53 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # php7ify 2 | 3 | php7ify is a project that brings new php7 classes, functions and exceptions to php 5.x 4 | 5 | [![Build Status](https://travis-ci.org/dstuecken/php7ify.svg)](https://travis-ci.org/dstuecken/php7ify) 6 | [![License](https://poser.pugx.org/dstuecken/php7ify/license)](https://packagist.org/packages/dstuecken/php7ify) 7 | [![Latest Stable Version](https://poser.pugx.org/dstuecken/php7ify/v/stable)](https://packagist.org/packages/dstuecken/php7ify) 8 | [![Latest Unstable Version](https://poser.pugx.org/dstuecken/php7ify/v/unstable)](https://packagist.org/packages/dstuecken/php7ify) 9 | 10 | ## Requirements 11 | 12 | * PHP 5.3 13 | 14 | ## Installation 15 | 16 | ### Using Composer 17 | 18 | To install php7ify with composer, just add the following to your composer.json file: 19 | 20 | ```json 21 | { 22 | "require": { 23 | "dstuecken/php7ify": "1.0" 24 | } 25 | } 26 | ``` 27 | 28 | or by running the following command: 29 | 30 | ```shell 31 | composer require dstuecken/php7ify 32 | ``` 33 | 34 | # Usage 35 | 36 | Just use the new \Throwable interface in your php 5 project, or catch an \Error exception. 37 | 38 | ```php 39 | try 40 | { 41 | mysql_query(); 42 | } 43 | catch (Error $e) 44 | { 45 | echo $e->getMessage() . "\n\n"; 46 | echo $e->getTraceAsString(); 47 | } 48 | ``` 49 | -------------------------------------------------------------------------------- /src/Throwable.php: -------------------------------------------------------------------------------- 1 | 10 | * 11 | * @since 7.0 12 | */ 13 | if (!interface_exists('\Throwable')) 14 | { 15 | interface Throwable 16 | { 17 | 18 | /*** 19 | * Get the error message 20 | * 21 | * @link http://php.net/manual/en/throwable.getmessage.php 22 | * @return string 23 | * 24 | * @since 7.0 25 | */ 26 | public function getMessage(); 27 | 28 | /** 29 | * Gets the exception code 30 | * 31 | * @link http://php.net/manual/en/throwable.getcode.php 32 | * @return int Returns the exception code as integer in 33 | * 34 | * @since 7.0 35 | */ 36 | public function getCode(); 37 | 38 | /** 39 | * Gets the file in which the exception occurred 40 | * 41 | * @link http://php.net/manual/en/throwable.getfile.php 42 | * @return string Returns the name of the file from which the object was thrown. 43 | * 44 | * @since 7.0 45 | */ 46 | public function getFile(); 47 | 48 | /** 49 | * Gets the line on which the object was instantiated 50 | * 51 | * @link http://php.net/manual/en/throwable.getline.php 52 | * @return int Returns the line number where the thrown object was instantiated. 53 | * @since 7.0 54 | */ 55 | public function getLine(); 56 | 57 | /** 58 | * Gets the stack trace 59 | * 60 | * @link http://php.net/manual/en/throwable.gettrace.php 61 | * @return array Returns the stack trace as an array in the same format as 62 | * @see debug_backtrace() 63 | * 64 | * @since 7.0 65 | */ 66 | public function getTrace(); 67 | 68 | /** 69 | * Gets the stack trace as a string 70 | * 71 | * @link http://php.net/manual/en/throwable.gettraceasstring.php 72 | * @return string Returns the stack trace as a string. 73 | * 74 | * @since 7.0 75 | */ 76 | public function getTraceAsString(); 77 | 78 | /** 79 | * Returns the previous Throwable 80 | * 81 | * @link http://php.net/manual/en/throwable.getprevious.php 82 | * @return Throwable Returns the previous {@see Throwable} if available, or NULL otherwise. 83 | * 84 | * @since 7.0 85 | */ 86 | public function getPrevious(); 87 | 88 | /** 89 | * Gets a string representation of the thrown object 90 | * 91 | * @link http://php.net/manual/en/throwable.tostring.php 92 | * @return string Returns the string representation of the thrown object. 93 | * 94 | * @since 7.0 95 | */ 96 | public function __toString(); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /src/IntlChar.php: -------------------------------------------------------------------------------- 1 | 10 | * 11 | * @since 7.0 12 | */ 13 | if (!class_exists('\IntlChar')) 14 | { 15 | class IntlChar 16 | { 17 | const UNICODE_VERSION = 8.0; 18 | const CODEPOINT_MIN = 0; 19 | const CODEPOINT_MAX = 1114111; 20 | const FOLD_CASE_DEFAULT = 0; 21 | const FOLD_CASE_EXCLUDE_SPECIAL_I = 1; 22 | const PROPERTY_ALPHABETIC = 0; 23 | const PROPERTY_BINARY_START = 0; 24 | const PROPERTY_ASCII_HEX_DIGIT = 1; 25 | const PROPERTY_BIDI_CONTROL = 2; 26 | const PROPERTY_BIDI_MIRRORED = 3; 27 | const PROPERTY_DASH = 4; 28 | const PROPERTY_DEFAULT_IGNORABLE_CODE_POINT = 5; 29 | const PROPERTY_DEPRECATED = 6; 30 | const PROPERTY_DIACRITIC = 7; 31 | const PROPERTY_EXTENDER = 8; 32 | const PROPERTY_FULL_COMPOSITION_EXCLUSION = 9; 33 | const PROPERTY_GRAPHEME_BASE = 10; 34 | const PROPERTY_GRAPHEME_EXTEND = 11; 35 | const PROPERTY_GRAPHEME_LINK = 12; 36 | const PROPERTY_HEX_DIGIT = 13; 37 | const PROPERTY_HYPHEN = 14; 38 | const PROPERTY_ID_CONTINUE = 15; 39 | const PROPERTY_ID_START = 16; 40 | const PROPERTY_IDEOGRAPHIC = 17; 41 | const PROPERTY_IDS_BINARY_OPERATOR = 18; 42 | const PROPERTY_IDS_TRINARY_OPERATOR = 19; 43 | const PROPERTY_JOIN_CONTROL = 20; 44 | const PROPERTY_LOGICAL_ORDER_EXCEPTION = 21; 45 | const PROPERTY_LOWERCASE = 22; 46 | const PROPERTY_MATH = 23; 47 | const PROPERTY_NONCHARACTER_CODE_POINT = 24; 48 | const PROPERTY_QUOTATION_MARK = 25; 49 | const PROPERTY_RADICAL = 26; 50 | const PROPERTY_SOFT_DOTTED = 27; 51 | const PROPERTY_TERMINAL_PUNCTUATION = 28; 52 | const PROPERTY_UNIFIED_IDEOGRAPH = 29; 53 | const PROPERTY_UPPERCASE = 30; 54 | const PROPERTY_WHITE_SPACE = 31; 55 | const PROPERTY_XID_CONTINUE = 32; 56 | const PROPERTY_XID_START = 33; 57 | const PROPERTY_CASE_SENSITIVE = 34; 58 | const PROPERTY_S_TERM = 35; 59 | const PROPERTY_VARIATION_SELECTOR = 36; 60 | const PROPERTY_NFD_INERT = 37; 61 | const PROPERTY_NFKD_INERT = 38; 62 | const PROPERTY_NFC_INERT = 39; 63 | const PROPERTY_NFKC_INERT = 40; 64 | const PROPERTY_SEGMENT_STARTER = 41; 65 | const PROPERTY_PATTERN_SYNTAX = 42; 66 | const PROPERTY_PATTERN_WHITE_SPACE = 43; 67 | const PROPERTY_POSIX_ALNUM = 44; 68 | const PROPERTY_POSIX_BLANK = 45; 69 | const PROPERTY_POSIX_GRAPH = 46; 70 | const PROPERTY_POSIX_PRINT = 47; 71 | const PROPERTY_POSIX_XDIGIT = 48; 72 | const PROPERTY_CASED = 49; 73 | const PROPERTY_CASE_IGNORABLE = 50; 74 | const PROPERTY_CHANGES_WHEN_LOWERCASED = 51; 75 | const PROPERTY_CHANGES_WHEN_UPPERCASED = 52; 76 | const PROPERTY_CHANGES_WHEN_TITLECASED = 53; 77 | const PROPERTY_CHANGES_WHEN_CASEFOLDED = 54; 78 | const PROPERTY_CHANGES_WHEN_CASEMAPPED = 55; 79 | const PROPERTY_CHANGES_WHEN_NFKC_CASEFOLDED = 56; 80 | const PROPERTY_BINARY_LIMIT = 57; 81 | const PROPERTY_BIDI_CLASS = 4096; 82 | const PROPERTY_INT_START = 4096; 83 | const PROPERTY_BLOCK = 4097; 84 | const PROPERTY_CANONICAL_COMBINING_CLASS = 4098; 85 | const PROPERTY_DECOMPOSITION_TYPE = 4099; 86 | const PROPERTY_EAST_ASIAN_WIDTH = 4100; 87 | const PROPERTY_GENERAL_CATEGORY = 4101; 88 | const PROPERTY_JOINING_GROUP = 4102; 89 | const PROPERTY_JOINING_TYPE = 4103; 90 | const PROPERTY_LINE_BREAK = 4104; 91 | const PROPERTY_NUMERIC_TYPE = 4105; 92 | const PROPERTY_SCRIPT = 4106; 93 | const PROPERTY_HANGUL_SYLLABLE_TYPE = 4107; 94 | const PROPERTY_NFD_QUICK_CHECK = 4108; 95 | const PROPERTY_NFKD_QUICK_CHECK = 4109; 96 | const PROPERTY_NFC_QUICK_CHECK = 4110; 97 | const PROPERTY_NFKC_QUICK_CHECK = 4111; 98 | const PROPERTY_LEAD_CANONICAL_COMBINING_CLASS = 4112; 99 | const PROPERTY_TRAIL_CANONICAL_COMBINING_CLASS = 4113; 100 | const PROPERTY_GRAPHEME_CLUSTER_BREAK = 4114; 101 | const PROPERTY_SENTENCE_BREAK = 4115; 102 | const PROPERTY_WORD_BREAK = 4116; 103 | const PROPERTY_BIDI_PAIRED_BRACKET_TYPE = 4117; 104 | const PROPERTY_INT_LIMIT = 4118; 105 | const PROPERTY_GENERAL_CATEGORY_MASK = 8192; 106 | const PROPERTY_MASK_START = 8192; 107 | const PROPERTY_MASK_LIMIT = 8193; 108 | const PROPERTY_NUMERIC_VALUE = 12288; 109 | const PROPERTY_DOUBLE_START = 12288; 110 | const PROPERTY_DOUBLE_LIMIT = 12289; 111 | const PROPERTY_AGE = 16384; 112 | const PROPERTY_STRING_START = 16384; 113 | const PROPERTY_BIDI_MIRRORING_GLYPH = 16385; 114 | const PROPERTY_CASE_FOLDING = 16386; 115 | const PROPERTY_ISO_COMMENT = 16387; 116 | const PROPERTY_LOWERCASE_MAPPING = 16388; 117 | const PROPERTY_NAME = 16389; 118 | const PROPERTY_SIMPLE_CASE_FOLDING = 16390; 119 | const PROPERTY_SIMPLE_LOWERCASE_MAPPING = 16391; 120 | const PROPERTY_SIMPLE_TITLECASE_MAPPING = 16392; 121 | const PROPERTY_SIMPLE_UPPERCASE_MAPPING = 16393; 122 | const PROPERTY_TITLECASE_MAPPING = 16394; 123 | const PROPERTY_UNICODE_1_NAME = 16395; 124 | const PROPERTY_UPPERCASE_MAPPING = 16396; 125 | const PROPERTY_BIDI_PAIRED_BRACKET = 16397; 126 | const PROPERTY_STRING_LIMIT = 16398; 127 | const PROPERTY_SCRIPT_EXTENSIONS = 28672; 128 | const PROPERTY_OTHER_PROPERTY_START = 28672; 129 | const PROPERTY_OTHER_PROPERTY_LIMIT = 28673; 130 | const PROPERTY_INVALID_CODE = -1; 131 | const CHAR_CATEGORY_UNASSIGNED = 0; 132 | const CHAR_CATEGORY_GENERAL_OTHER_TYPES = 0; 133 | const CHAR_CATEGORY_UPPERCASE_LETTER = 1; 134 | const CHAR_CATEGORY_LOWERCASE_LETTER = 2; 135 | const CHAR_CATEGORY_TITLECASE_LETTER = 3; 136 | const CHAR_CATEGORY_MODIFIER_LETTER = 4; 137 | const CHAR_CATEGORY_OTHER_LETTER = 5; 138 | const CHAR_CATEGORY_NON_SPACING_MARK = 6; 139 | const CHAR_CATEGORY_ENCLOSING_MARK = 7; 140 | const CHAR_CATEGORY_COMBINING_SPACING_MARK = 8; 141 | const CHAR_CATEGORY_DECIMAL_DIGIT_NUMBER = 9; 142 | const CHAR_CATEGORY_LETTER_NUMBER = 10; 143 | const CHAR_CATEGORY_OTHER_NUMBER = 11; 144 | const CHAR_CATEGORY_SPACE_SEPARATOR = 12; 145 | const CHAR_CATEGORY_LINE_SEPARATOR = 13; 146 | const CHAR_CATEGORY_PARAGRAPH_SEPARATOR = 14; 147 | const CHAR_CATEGORY_CONTROL_CHAR = 15; 148 | const CHAR_CATEGORY_FORMAT_CHAR = 16; 149 | const CHAR_CATEGORY_PRIVATE_USE_CHAR = 17; 150 | const CHAR_CATEGORY_SURROGATE = 18; 151 | const CHAR_CATEGORY_DASH_PUNCTUATION = 19; 152 | const CHAR_CATEGORY_START_PUNCTUATION = 20; 153 | const CHAR_CATEGORY_END_PUNCTUATION = 21; 154 | const CHAR_CATEGORY_CONNECTOR_PUNCTUATION = 22; 155 | const CHAR_CATEGORY_OTHER_PUNCTUATION = 23; 156 | const CHAR_CATEGORY_MATH_SYMBOL = 24; 157 | const CHAR_CATEGORY_CURRENCY_SYMBOL = 25; 158 | const CHAR_CATEGORY_MODIFIER_SYMBOL = 26; 159 | const CHAR_CATEGORY_OTHER_SYMBOL = 27; 160 | const CHAR_CATEGORY_INITIAL_PUNCTUATION = 28; 161 | const CHAR_CATEGORY_FINAL_PUNCTUATION = 29; 162 | const CHAR_CATEGORY_CHAR_CATEGORY_COUNT = 30; 163 | const CHAR_DIRECTION_LEFT_TO_RIGHT = 0; 164 | const CHAR_DIRECTION_RIGHT_TO_LEFT = 1; 165 | const CHAR_DIRECTION_EUROPEAN_NUMBER = 2; 166 | const CHAR_DIRECTION_EUROPEAN_NUMBER_SEPARATOR = 3; 167 | const CHAR_DIRECTION_EUROPEAN_NUMBER_TERMINATOR = 4; 168 | const CHAR_DIRECTION_ARABIC_NUMBER = 5; 169 | const CHAR_DIRECTION_COMMON_NUMBER_SEPARATOR = 6; 170 | const CHAR_DIRECTION_BLOCK_SEPARATOR = 7; 171 | const CHAR_DIRECTION_SEGMENT_SEPARATOR = 8; 172 | const CHAR_DIRECTION_WHITE_SPACE_NEUTRAL = 9; 173 | const CHAR_DIRECTION_OTHER_NEUTRAL = 10; 174 | const CHAR_DIRECTION_LEFT_TO_RIGHT_EMBEDDING = 11; 175 | const CHAR_DIRECTION_LEFT_TO_RIGHT_OVERRIDE = 12; 176 | const CHAR_DIRECTION_RIGHT_TO_LEFT_ARABIC = 13; 177 | const CHAR_DIRECTION_RIGHT_TO_LEFT_EMBEDDING = 14; 178 | const CHAR_DIRECTION_RIGHT_TO_LEFT_OVERRIDE = 15; 179 | const CHAR_DIRECTION_POP_DIRECTIONAL_FORMAT = 16; 180 | const CHAR_DIRECTION_DIR_NON_SPACING_MARK = 17; 181 | const CHAR_DIRECTION_BOUNDARY_NEUTRAL = 18; 182 | const CHAR_DIRECTION_FIRST_STRONG_ISOLATE = 19; 183 | const CHAR_DIRECTION_LEFT_TO_RIGHT_ISOLATE = 20; 184 | const CHAR_DIRECTION_RIGHT_TO_LEFT_ISOLATE = 21; 185 | const CHAR_DIRECTION_POP_DIRECTIONAL_ISOLATE = 22; 186 | const CHAR_DIRECTION_CHAR_DIRECTION_COUNT = 23; 187 | const BLOCK_CODE_NO_BLOCK = 0; 188 | const BLOCK_CODE_BASIC_LATIN = 1; 189 | const BLOCK_CODE_LATIN_1_SUPPLEMENT = 2; 190 | const BLOCK_CODE_LATIN_EXTENDED_A = 3; 191 | const BLOCK_CODE_LATIN_EXTENDED_B = 4; 192 | const BLOCK_CODE_IPA_EXTENSIONS = 5; 193 | const BLOCK_CODE_SPACING_MODIFIER_LETTERS = 6; 194 | const BLOCK_CODE_COMBINING_DIACRITICAL_MARKS = 7; 195 | const BLOCK_CODE_GREEK = 8; 196 | const BLOCK_CODE_CYRILLIC = 9; 197 | const BLOCK_CODE_ARMENIAN = 10; 198 | const BLOCK_CODE_HEBREW = 11; 199 | const BLOCK_CODE_ARABIC = 12; 200 | const BLOCK_CODE_SYRIAC = 13; 201 | const BLOCK_CODE_THAANA = 14; 202 | const BLOCK_CODE_DEVANAGARI = 15; 203 | const BLOCK_CODE_BENGALI = 16; 204 | const BLOCK_CODE_GURMUKHI = 17; 205 | const BLOCK_CODE_GUJARATI = 18; 206 | const BLOCK_CODE_ORIYA = 19; 207 | const BLOCK_CODE_TAMIL = 20; 208 | const BLOCK_CODE_TELUGU = 21; 209 | const BLOCK_CODE_KANNADA = 22; 210 | const BLOCK_CODE_MALAYALAM = 23; 211 | const BLOCK_CODE_SINHALA = 24; 212 | const BLOCK_CODE_THAI = 25; 213 | const BLOCK_CODE_LAO = 26; 214 | const BLOCK_CODE_TIBETAN = 27; 215 | const BLOCK_CODE_MYANMAR = 28; 216 | const BLOCK_CODE_GEORGIAN = 29; 217 | const BLOCK_CODE_HANGUL_JAMO = 30; 218 | const BLOCK_CODE_ETHIOPIC = 31; 219 | const BLOCK_CODE_CHEROKEE = 32; 220 | const BLOCK_CODE_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS = 33; 221 | const BLOCK_CODE_OGHAM = 34; 222 | const BLOCK_CODE_RUNIC = 35; 223 | const BLOCK_CODE_KHMER = 36; 224 | const BLOCK_CODE_MONGOLIAN = 37; 225 | const BLOCK_CODE_LATIN_EXTENDED_ADDITIONAL = 38; 226 | const BLOCK_CODE_GREEK_EXTENDED = 39; 227 | const BLOCK_CODE_GENERAL_PUNCTUATION = 40; 228 | const BLOCK_CODE_SUPERSCRIPTS_AND_SUBSCRIPTS = 41; 229 | const BLOCK_CODE_CURRENCY_SYMBOLS = 42; 230 | const BLOCK_CODE_COMBINING_MARKS_FOR_SYMBOLS = 43; 231 | const BLOCK_CODE_LETTERLIKE_SYMBOLS = 44; 232 | const BLOCK_CODE_NUMBER_FORMS = 45; 233 | const BLOCK_CODE_ARROWS = 46; 234 | const BLOCK_CODE_MATHEMATICAL_OPERATORS = 47; 235 | const BLOCK_CODE_MISCELLANEOUS_TECHNICAL = 48; 236 | const BLOCK_CODE_CONTROL_PICTURES = 49; 237 | const BLOCK_CODE_OPTICAL_CHARACTER_RECOGNITION = 50; 238 | const BLOCK_CODE_ENCLOSED_ALPHANUMERICS = 51; 239 | const BLOCK_CODE_BOX_DRAWING = 52; 240 | const BLOCK_CODE_BLOCK_ELEMENTS = 53; 241 | const BLOCK_CODE_GEOMETRIC_SHAPES = 54; 242 | const BLOCK_CODE_MISCELLANEOUS_SYMBOLS = 55; 243 | const BLOCK_CODE_DINGBATS = 56; 244 | const BLOCK_CODE_BRAILLE_PATTERNS = 57; 245 | const BLOCK_CODE_CJK_RADICALS_SUPPLEMENT = 58; 246 | const BLOCK_CODE_KANGXI_RADICALS = 59; 247 | const BLOCK_CODE_IDEOGRAPHIC_DESCRIPTION_CHARACTERS = 60; 248 | const BLOCK_CODE_CJK_SYMBOLS_AND_PUNCTUATION = 61; 249 | const BLOCK_CODE_HIRAGANA = 62; 250 | const BLOCK_CODE_KATAKANA = 63; 251 | const BLOCK_CODE_BOPOMOFO = 64; 252 | const BLOCK_CODE_HANGUL_COMPATIBILITY_JAMO = 65; 253 | const BLOCK_CODE_KANBUN = 66; 254 | const BLOCK_CODE_BOPOMOFO_EXTENDED = 67; 255 | const BLOCK_CODE_ENCLOSED_CJK_LETTERS_AND_MONTHS = 68; 256 | const BLOCK_CODE_CJK_COMPATIBILITY = 69; 257 | const BLOCK_CODE_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A = 70; 258 | const BLOCK_CODE_CJK_UNIFIED_IDEOGRAPHS = 71; 259 | const BLOCK_CODE_YI_SYLLABLES = 72; 260 | const BLOCK_CODE_YI_RADICALS = 73; 261 | const BLOCK_CODE_HANGUL_SYLLABLES = 74; 262 | const BLOCK_CODE_HIGH_SURROGATES = 75; 263 | const BLOCK_CODE_HIGH_PRIVATE_USE_SURROGATES = 76; 264 | const BLOCK_CODE_LOW_SURROGATES = 77; 265 | const BLOCK_CODE_PRIVATE_USE_AREA = 78; 266 | const BLOCK_CODE_PRIVATE_USE = 78; 267 | const BLOCK_CODE_CJK_COMPATIBILITY_IDEOGRAPHS = 79; 268 | const BLOCK_CODE_ALPHABETIC_PRESENTATION_FORMS = 80; 269 | const BLOCK_CODE_ARABIC_PRESENTATION_FORMS_A = 81; 270 | const BLOCK_CODE_COMBINING_HALF_MARKS = 82; 271 | const BLOCK_CODE_CJK_COMPATIBILITY_FORMS = 83; 272 | const BLOCK_CODE_SMALL_FORM_VARIANTS = 84; 273 | const BLOCK_CODE_ARABIC_PRESENTATION_FORMS_B = 85; 274 | const BLOCK_CODE_SPECIALS = 86; 275 | const BLOCK_CODE_HALFWIDTH_AND_FULLWIDTH_FORMS = 87; 276 | const BLOCK_CODE_OLD_ITALIC = 88; 277 | const BLOCK_CODE_GOTHIC = 89; 278 | const BLOCK_CODE_DESERET = 90; 279 | const BLOCK_CODE_BYZANTINE_MUSICAL_SYMBOLS = 91; 280 | const BLOCK_CODE_MUSICAL_SYMBOLS = 92; 281 | const BLOCK_CODE_MATHEMATICAL_ALPHANUMERIC_SYMBOLS = 93; 282 | const BLOCK_CODE_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B = 94; 283 | const BLOCK_CODE_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT = 95; 284 | const BLOCK_CODE_TAGS = 96; 285 | const BLOCK_CODE_CYRILLIC_SUPPLEMENT = 97; 286 | const BLOCK_CODE_CYRILLIC_SUPPLEMENTARY = 97; 287 | const BLOCK_CODE_TAGALOG = 98; 288 | const BLOCK_CODE_HANUNOO = 99; 289 | const BLOCK_CODE_BUHID = 100; 290 | const BLOCK_CODE_TAGBANWA = 101; 291 | const BLOCK_CODE_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A = 102; 292 | const BLOCK_CODE_SUPPLEMENTAL_ARROWS_A = 103; 293 | const BLOCK_CODE_SUPPLEMENTAL_ARROWS_B = 104; 294 | const BLOCK_CODE_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B = 105; 295 | const BLOCK_CODE_SUPPLEMENTAL_MATHEMATICAL_OPERATORS = 106; 296 | const BLOCK_CODE_KATAKANA_PHONETIC_EXTENSIONS = 107; 297 | const BLOCK_CODE_VARIATION_SELECTORS = 108; 298 | const BLOCK_CODE_SUPPLEMENTARY_PRIVATE_USE_AREA_A = 109; 299 | const BLOCK_CODE_SUPPLEMENTARY_PRIVATE_USE_AREA_B = 110; 300 | const BLOCK_CODE_LIMBU = 111; 301 | const BLOCK_CODE_TAI_LE = 112; 302 | const BLOCK_CODE_KHMER_SYMBOLS = 113; 303 | const BLOCK_CODE_PHONETIC_EXTENSIONS = 114; 304 | const BLOCK_CODE_MISCELLANEOUS_SYMBOLS_AND_ARROWS = 115; 305 | const BLOCK_CODE_YIJING_HEXAGRAM_SYMBOLS = 116; 306 | const BLOCK_CODE_LINEAR_B_SYLLABARY = 117; 307 | const BLOCK_CODE_LINEAR_B_IDEOGRAMS = 118; 308 | const BLOCK_CODE_AEGEAN_NUMBERS = 119; 309 | const BLOCK_CODE_UGARITIC = 120; 310 | const BLOCK_CODE_SHAVIAN = 121; 311 | const BLOCK_CODE_OSMANYA = 122; 312 | const BLOCK_CODE_CYPRIOT_SYLLABARY = 123; 313 | const BLOCK_CODE_TAI_XUAN_JING_SYMBOLS = 124; 314 | const BLOCK_CODE_VARIATION_SELECTORS_SUPPLEMENT = 125; 315 | const BLOCK_CODE_ANCIENT_GREEK_MUSICAL_NOTATION = 126; 316 | const BLOCK_CODE_ANCIENT_GREEK_NUMBERS = 127; 317 | const BLOCK_CODE_ARABIC_SUPPLEMENT = 128; 318 | const BLOCK_CODE_BUGINESE = 129; 319 | const BLOCK_CODE_CJK_STROKES = 130; 320 | const BLOCK_CODE_COMBINING_DIACRITICAL_MARKS_SUPPLEMENT = 131; 321 | const BLOCK_CODE_COPTIC = 132; 322 | const BLOCK_CODE_ETHIOPIC_EXTENDED = 133; 323 | const BLOCK_CODE_ETHIOPIC_SUPPLEMENT = 134; 324 | const BLOCK_CODE_GEORGIAN_SUPPLEMENT = 135; 325 | const BLOCK_CODE_GLAGOLITIC = 136; 326 | const BLOCK_CODE_KHAROSHTHI = 137; 327 | const BLOCK_CODE_MODIFIER_TONE_LETTERS = 138; 328 | const BLOCK_CODE_NEW_TAI_LUE = 139; 329 | const BLOCK_CODE_OLD_PERSIAN = 140; 330 | const BLOCK_CODE_PHONETIC_EXTENSIONS_SUPPLEMENT = 141; 331 | const BLOCK_CODE_SUPPLEMENTAL_PUNCTUATION = 142; 332 | const BLOCK_CODE_SYLOTI_NAGRI = 143; 333 | const BLOCK_CODE_TIFINAGH = 144; 334 | const BLOCK_CODE_VERTICAL_FORMS = 145; 335 | const BLOCK_CODE_NKO = 146; 336 | const BLOCK_CODE_BALINESE = 147; 337 | const BLOCK_CODE_LATIN_EXTENDED_C = 148; 338 | const BLOCK_CODE_LATIN_EXTENDED_D = 149; 339 | const BLOCK_CODE_PHAGS_PA = 150; 340 | const BLOCK_CODE_PHOENICIAN = 151; 341 | const BLOCK_CODE_CUNEIFORM = 152; 342 | const BLOCK_CODE_CUNEIFORM_NUMBERS_AND_PUNCTUATION = 153; 343 | const BLOCK_CODE_COUNTING_ROD_NUMERALS = 154; 344 | const BLOCK_CODE_SUNDANESE = 155; 345 | const BLOCK_CODE_LEPCHA = 156; 346 | const BLOCK_CODE_OL_CHIKI = 157; 347 | const BLOCK_CODE_CYRILLIC_EXTENDED_A = 158; 348 | const BLOCK_CODE_VAI = 159; 349 | const BLOCK_CODE_CYRILLIC_EXTENDED_B = 160; 350 | const BLOCK_CODE_SAURASHTRA = 161; 351 | const BLOCK_CODE_KAYAH_LI = 162; 352 | const BLOCK_CODE_REJANG = 163; 353 | const BLOCK_CODE_CHAM = 164; 354 | const BLOCK_CODE_ANCIENT_SYMBOLS = 165; 355 | const BLOCK_CODE_PHAISTOS_DISC = 166; 356 | const BLOCK_CODE_LYCIAN = 167; 357 | const BLOCK_CODE_CARIAN = 168; 358 | const BLOCK_CODE_LYDIAN = 169; 359 | const BLOCK_CODE_MAHJONG_TILES = 170; 360 | const BLOCK_CODE_DOMINO_TILES = 171; 361 | const BLOCK_CODE_SAMARITAN = 172; 362 | const BLOCK_CODE_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED = 173; 363 | const BLOCK_CODE_TAI_THAM = 174; 364 | const BLOCK_CODE_VEDIC_EXTENSIONS = 175; 365 | const BLOCK_CODE_LISU = 176; 366 | const BLOCK_CODE_BAMUM = 177; 367 | const BLOCK_CODE_COMMON_INDIC_NUMBER_FORMS = 178; 368 | const BLOCK_CODE_DEVANAGARI_EXTENDED = 179; 369 | const BLOCK_CODE_HANGUL_JAMO_EXTENDED_A = 180; 370 | const BLOCK_CODE_JAVANESE = 181; 371 | const BLOCK_CODE_MYANMAR_EXTENDED_A = 182; 372 | const BLOCK_CODE_TAI_VIET = 183; 373 | const BLOCK_CODE_MEETEI_MAYEK = 184; 374 | const BLOCK_CODE_HANGUL_JAMO_EXTENDED_B = 185; 375 | const BLOCK_CODE_IMPERIAL_ARAMAIC = 186; 376 | const BLOCK_CODE_OLD_SOUTH_ARABIAN = 187; 377 | const BLOCK_CODE_AVESTAN = 188; 378 | const BLOCK_CODE_INSCRIPTIONAL_PARTHIAN = 189; 379 | const BLOCK_CODE_INSCRIPTIONAL_PAHLAVI = 190; 380 | const BLOCK_CODE_OLD_TURKIC = 191; 381 | const BLOCK_CODE_RUMI_NUMERAL_SYMBOLS = 192; 382 | const BLOCK_CODE_KAITHI = 193; 383 | const BLOCK_CODE_EGYPTIAN_HIEROGLYPHS = 194; 384 | const BLOCK_CODE_ENCLOSED_ALPHANUMERIC_SUPPLEMENT = 195; 385 | const BLOCK_CODE_ENCLOSED_IDEOGRAPHIC_SUPPLEMENT = 196; 386 | const BLOCK_CODE_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C = 197; 387 | const BLOCK_CODE_MANDAIC = 198; 388 | const BLOCK_CODE_BATAK = 199; 389 | const BLOCK_CODE_ETHIOPIC_EXTENDED_A = 200; 390 | const BLOCK_CODE_BRAHMI = 201; 391 | const BLOCK_CODE_BAMUM_SUPPLEMENT = 202; 392 | const BLOCK_CODE_KANA_SUPPLEMENT = 203; 393 | const BLOCK_CODE_PLAYING_CARDS = 204; 394 | const BLOCK_CODE_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS = 205; 395 | const BLOCK_CODE_EMOTICONS = 206; 396 | const BLOCK_CODE_TRANSPORT_AND_MAP_SYMBOLS = 207; 397 | const BLOCK_CODE_ALCHEMICAL_SYMBOLS = 208; 398 | const BLOCK_CODE_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D = 209; 399 | const BLOCK_CODE_ARABIC_EXTENDED_A = 210; 400 | const BLOCK_CODE_ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS = 211; 401 | const BLOCK_CODE_CHAKMA = 212; 402 | const BLOCK_CODE_MEETEI_MAYEK_EXTENSIONS = 213; 403 | const BLOCK_CODE_MEROITIC_CURSIVE = 214; 404 | const BLOCK_CODE_MEROITIC_HIEROGLYPHS = 215; 405 | const BLOCK_CODE_MIAO = 216; 406 | const BLOCK_CODE_SHARADA = 217; 407 | const BLOCK_CODE_SORA_SOMPENG = 218; 408 | const BLOCK_CODE_SUNDANESE_SUPPLEMENT = 219; 409 | const BLOCK_CODE_TAKRI = 220; 410 | const BLOCK_CODE_BASSA_VAH = 221; 411 | const BLOCK_CODE_CAUCASIAN_ALBANIAN = 222; 412 | const BLOCK_CODE_COPTIC_EPACT_NUMBERS = 223; 413 | const BLOCK_CODE_COMBINING_DIACRITICAL_MARKS_EXTENDED = 224; 414 | const BLOCK_CODE_DUPLOYAN = 225; 415 | const BLOCK_CODE_ELBASAN = 226; 416 | const BLOCK_CODE_GEOMETRIC_SHAPES_EXTENDED = 227; 417 | const BLOCK_CODE_GRANTHA = 228; 418 | const BLOCK_CODE_KHOJKI = 229; 419 | const BLOCK_CODE_KHUDAWADI = 230; 420 | const BLOCK_CODE_LATIN_EXTENDED_E = 231; 421 | const BLOCK_CODE_LINEAR_A = 232; 422 | const BLOCK_CODE_MAHAJANI = 233; 423 | const BLOCK_CODE_MANICHAEAN = 234; 424 | const BLOCK_CODE_MENDE_KIKAKUI = 235; 425 | const BLOCK_CODE_MODI = 236; 426 | const BLOCK_CODE_MRO = 237; 427 | const BLOCK_CODE_MYANMAR_EXTENDED_B = 238; 428 | const BLOCK_CODE_NABATAEAN = 239; 429 | const BLOCK_CODE_OLD_NORTH_ARABIAN = 240; 430 | const BLOCK_CODE_OLD_PERMIC = 241; 431 | const BLOCK_CODE_ORNAMENTAL_DINGBATS = 242; 432 | const BLOCK_CODE_PAHAWH_HMONG = 243; 433 | const BLOCK_CODE_PALMYRENE = 244; 434 | const BLOCK_CODE_PAU_CIN_HAU = 245; 435 | const BLOCK_CODE_PSALTER_PAHLAVI = 246; 436 | const BLOCK_CODE_SHORTHAND_FORMAT_CONTROLS = 247; 437 | const BLOCK_CODE_SIDDHAM = 248; 438 | const BLOCK_CODE_SINHALA_ARCHAIC_NUMBERS = 249; 439 | const BLOCK_CODE_SUPPLEMENTAL_ARROWS_C = 250; 440 | const BLOCK_CODE_TIRHUTA = 251; 441 | const BLOCK_CODE_WARANG_CITI = 252; 442 | const BLOCK_CODE_COUNT = 263; 443 | const BLOCK_CODE_INVALID_CODE = -1; 444 | const BPT_NONE = 0; 445 | const BPT_OPEN = 1; 446 | const BPT_CLOSE = 2; 447 | const BPT_COUNT = 3; 448 | const EA_NEUTRAL = 0; 449 | const EA_AMBIGUOUS = 1; 450 | const EA_HALFWIDTH = 2; 451 | const EA_FULLWIDTH = 3; 452 | const EA_NARROW = 4; 453 | const EA_WIDE = 5; 454 | const EA_COUNT = 6; 455 | const UNICODE_CHAR_NAME = 0; 456 | const UNICODE_10_CHAR_NAME = 1; 457 | const EXTENDED_CHAR_NAME = 2; 458 | const CHAR_NAME_ALIAS = 3; 459 | const CHAR_NAME_CHOICE_COUNT = 4; 460 | const SHORT_PROPERTY_NAME = 0; 461 | const LONG_PROPERTY_NAME = 1; 462 | const PROPERTY_NAME_CHOICE_COUNT = 2; 463 | const DT_NONE = 0; 464 | const DT_CANONICAL = 1; 465 | const DT_COMPAT = 2; 466 | const DT_CIRCLE = 3; 467 | const DT_FINAL = 4; 468 | const DT_FONT = 5; 469 | const DT_FRACTION = 6; 470 | const DT_INITIAL = 7; 471 | const DT_ISOLATED = 8; 472 | const DT_MEDIAL = 9; 473 | const DT_NARROW = 10; 474 | const DT_NOBREAK = 11; 475 | const DT_SMALL = 12; 476 | const DT_SQUARE = 13; 477 | const DT_SUB = 14; 478 | const DT_SUPER = 15; 479 | const DT_VERTICAL = 16; 480 | const DT_WIDE = 17; 481 | const DT_COUNT = 18; 482 | const JT_NON_JOINING = 0; 483 | const JT_JOIN_CAUSING = 1; 484 | const JT_DUAL_JOINING = 2; 485 | const JT_LEFT_JOINING = 3; 486 | const JT_RIGHT_JOINING = 4; 487 | const JT_TRANSPARENT = 5; 488 | const JT_COUNT = 6; 489 | const JG_NO_JOINING_GROUP = 0; 490 | const JG_AIN = 1; 491 | const JG_ALAPH = 2; 492 | const JG_ALEF = 3; 493 | const JG_BEH = 4; 494 | const JG_BETH = 5; 495 | const JG_DAL = 6; 496 | const JG_DALATH_RISH = 7; 497 | const JG_E = 8; 498 | const JG_FEH = 9; 499 | const JG_FINAL_SEMKATH = 10; 500 | const JG_GAF = 11; 501 | const JG_GAMAL = 12; 502 | const JG_HAH = 13; 503 | const JG_TEH_MARBUTA_GOAL = 14; 504 | const JG_HAMZA_ON_HEH_GOAL = 14; 505 | const JG_HE = 15; 506 | const JG_HEH = 16; 507 | const JG_HEH_GOAL = 17; 508 | const JG_HETH = 18; 509 | const JG_KAF = 19; 510 | const JG_KAPH = 20; 511 | const JG_KNOTTED_HEH = 21; 512 | const JG_LAM = 22; 513 | const JG_LAMADH = 23; 514 | const JG_MEEM = 24; 515 | const JG_MIM = 25; 516 | const JG_NOON = 26; 517 | const JG_NUN = 27; 518 | const JG_PE = 28; 519 | const JG_QAF = 29; 520 | const JG_QAPH = 30; 521 | const JG_REH = 31; 522 | const JG_REVERSED_PE = 32; 523 | const JG_SAD = 33; 524 | const JG_SADHE = 34; 525 | const JG_SEEN = 35; 526 | const JG_SEMKATH = 36; 527 | const JG_SHIN = 37; 528 | const JG_SWASH_KAF = 38; 529 | const JG_SYRIAC_WAW = 39; 530 | const JG_TAH = 40; 531 | const JG_TAW = 41; 532 | const JG_TEH_MARBUTA = 42; 533 | const JG_TETH = 43; 534 | const JG_WAW = 44; 535 | const JG_YEH = 45; 536 | const JG_YEH_BARREE = 46; 537 | const JG_YEH_WITH_TAIL = 47; 538 | const JG_YUDH = 48; 539 | const JG_YUDH_HE = 49; 540 | const JG_ZAIN = 50; 541 | const JG_FE = 51; 542 | const JG_KHAPH = 52; 543 | const JG_ZHAIN = 53; 544 | const JG_BURUSHASKI_YEH_BARREE = 54; 545 | const JG_FARSI_YEH = 55; 546 | const JG_NYA = 56; 547 | const JG_ROHINGYA_YEH = 57; 548 | const JG_MANICHAEAN_ALEPH = 58; 549 | const JG_MANICHAEAN_AYIN = 59; 550 | const JG_MANICHAEAN_BETH = 60; 551 | const JG_MANICHAEAN_DALETH = 61; 552 | const JG_MANICHAEAN_DHAMEDH = 62; 553 | const JG_MANICHAEAN_FIVE = 63; 554 | const JG_MANICHAEAN_GIMEL = 64; 555 | const JG_MANICHAEAN_HETH = 65; 556 | const JG_MANICHAEAN_HUNDRED = 66; 557 | const JG_MANICHAEAN_KAPH = 67; 558 | const JG_MANICHAEAN_LAMEDH = 68; 559 | const JG_MANICHAEAN_MEM = 69; 560 | const JG_MANICHAEAN_NUN = 70; 561 | const JG_MANICHAEAN_ONE = 71; 562 | const JG_MANICHAEAN_PE = 72; 563 | const JG_MANICHAEAN_QOPH = 73; 564 | const JG_MANICHAEAN_RESH = 74; 565 | const JG_MANICHAEAN_SADHE = 75; 566 | const JG_MANICHAEAN_SAMEKH = 76; 567 | const JG_MANICHAEAN_TAW = 77; 568 | const JG_MANICHAEAN_TEN = 78; 569 | const JG_MANICHAEAN_TETH = 79; 570 | const JG_MANICHAEAN_THAMEDH = 80; 571 | const JG_MANICHAEAN_TWENTY = 81; 572 | const JG_MANICHAEAN_WAW = 82; 573 | const JG_MANICHAEAN_YODH = 83; 574 | const JG_MANICHAEAN_ZAYIN = 84; 575 | const JG_STRAIGHT_WAW = 85; 576 | const JG_COUNT = 86; 577 | const GCB_OTHER = 0; 578 | const GCB_CONTROL = 1; 579 | const GCB_CR = 2; 580 | const GCB_EXTEND = 3; 581 | const GCB_L = 4; 582 | const GCB_LF = 5; 583 | const GCB_LV = 6; 584 | const GCB_LVT = 7; 585 | const GCB_T = 8; 586 | const GCB_V = 9; 587 | const GCB_SPACING_MARK = 10; 588 | const GCB_PREPEND = 11; 589 | const GCB_REGIONAL_INDICATOR = 12; 590 | const GCB_COUNT = 13; 591 | const WB_OTHER = 0; 592 | const WB_ALETTER = 1; 593 | const WB_FORMAT = 2; 594 | const WB_KATAKANA = 3; 595 | const WB_MIDLETTER = 4; 596 | const WB_MIDNUM = 5; 597 | const WB_NUMERIC = 6; 598 | const WB_EXTENDNUMLET = 7; 599 | const WB_CR = 8; 600 | const WB_EXTEND = 9; 601 | const WB_LF = 10; 602 | const WB_MIDNUMLET = 11; 603 | const WB_NEWLINE = 12; 604 | const WB_REGIONAL_INDICATOR = 13; 605 | const WB_HEBREW_LETTER = 14; 606 | const WB_SINGLE_QUOTE = 15; 607 | const WB_DOUBLE_QUOTE = 16; 608 | const WB_COUNT = 17; 609 | const SB_OTHER = 0; 610 | const SB_ATERM = 1; 611 | const SB_CLOSE = 2; 612 | const SB_FORMAT = 3; 613 | const SB_LOWER = 4; 614 | const SB_NUMERIC = 5; 615 | const SB_OLETTER = 6; 616 | const SB_SEP = 7; 617 | const SB_SP = 8; 618 | const SB_STERM = 9; 619 | const SB_UPPER = 10; 620 | const SB_CR = 11; 621 | const SB_EXTEND = 12; 622 | const SB_LF = 13; 623 | const SB_SCONTINUE = 14; 624 | const SB_COUNT = 15; 625 | const LB_UNKNOWN = 0; 626 | const LB_AMBIGUOUS = 1; 627 | const LB_ALPHABETIC = 2; 628 | const LB_BREAK_BOTH = 3; 629 | const LB_BREAK_AFTER = 4; 630 | const LB_BREAK_BEFORE = 5; 631 | const LB_MANDATORY_BREAK = 6; 632 | const LB_CONTINGENT_BREAK = 7; 633 | const LB_CLOSE_PUNCTUATION = 8; 634 | const LB_COMBINING_MARK = 9; 635 | const LB_CARRIAGE_RETURN = 10; 636 | const LB_EXCLAMATION = 11; 637 | const LB_GLUE = 12; 638 | const LB_HYPHEN = 13; 639 | const LB_IDEOGRAPHIC = 14; 640 | const LB_INSEPARABLE = 15; 641 | const LB_INSEPERABLE = 15; 642 | const LB_INFIX_NUMERIC = 16; 643 | const LB_LINE_FEED = 17; 644 | const LB_NONSTARTER = 18; 645 | const LB_NUMERIC = 19; 646 | const LB_OPEN_PUNCTUATION = 20; 647 | const LB_POSTFIX_NUMERIC = 21; 648 | const LB_PREFIX_NUMERIC = 22; 649 | const LB_QUOTATION = 23; 650 | const LB_COMPLEX_CONTEXT = 24; 651 | const LB_SURROGATE = 25; 652 | const LB_SPACE = 26; 653 | const LB_BREAK_SYMBOLS = 27; 654 | const LB_ZWSPACE = 28; 655 | const LB_NEXT_LINE = 29; 656 | const LB_WORD_JOINER = 30; 657 | const LB_H2 = 31; 658 | const LB_H3 = 32; 659 | const LB_JL = 33; 660 | const LB_JT = 34; 661 | const LB_JV = 35; 662 | const LB_CLOSE_PARENTHESIS = 36; 663 | const LB_CONDITIONAL_JAPANESE_STARTER = 37; 664 | const LB_HEBREW_LETTER = 38; 665 | const LB_REGIONAL_INDICATOR = 39; 666 | const LB_COUNT = 40; 667 | const NT_NONE = 0; 668 | const NT_DECIMAL = 1; 669 | const NT_DIGIT = 2; 670 | const NT_NUMERIC = 3; 671 | const NT_COUNT = 4; 672 | const HST_NOT_APPLICABLE = 0; 673 | const HST_LEADING_JAMO = 1; 674 | const HST_VOWEL_JAMO = 2; 675 | const HST_TRAILING_JAMO = 3; 676 | const HST_LV_SYLLABLE = 4; 677 | const HST_LVT_SYLLABLE = 5; 678 | const HST_COUNT = 6; 679 | 680 | /** 681 | * Check a binary Unicode property for a code point 682 | * 683 | * @link http://php.net/manual/ru/intlchar.hasbinaryproperty.php 684 | * 685 | * @param mixed $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}") 686 | * @param int $property The Unicode property to lookup (see the IntlChar::PROPERTY_* constants). 687 | * 688 | * @return bool Returns TRUE or FALSE according to the binary Unicode property value for codepoint. 689 | * Also FALSE if property is out of bounds or if the Unicode version does not have data for the property at all, or not for this code point. 690 | * @since 7.0 691 | */ 692 | static public function hasBinaryProperty($codepoint, $property) 693 | { 694 | } 695 | 696 | /** 697 | * @param int $codepoint 698 | * 699 | * @return bool 700 | * @since 7.0 701 | */ 702 | static public function isAlphabetic($codepoint) 703 | { 704 | } 705 | 706 | /** 707 | * @link http://php.net/manual/ru/intlchar.charage.php 708 | * Get the "age" of the code point 709 | * 710 | * @param int $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}") 711 | * 712 | * @return array The Unicode version number, as an array. For example, version 1.3.31.2 would be represented as [1, 3, 31, 2]. 713 | * @since 7.0 714 | */ 715 | public static function charAge($codepoint) 716 | { 717 | } 718 | 719 | /** 720 | * @link http://php.net/manual/ru/intlchar.chardigitvalue.php 721 | * Get the decimal digit value of a decimal digit character 722 | * 723 | * @param mixed $codepoint The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}") 724 | * 725 | * @return int The decimal digit value of codepoint, or -1 if it is not a decimal digit character. 726 | * @since 7.0 727 | */ 728 | public static function charDigitValue($codepoint) 729 | { 730 | } 731 | 732 | /** 733 | * Get bidirectional category value for a code point 734 | * 735 | * @link http://php.net/manual/ru/intlchar.chardirection.php 736 | * 737 | * @param int $codepoint

The integer codepoint value (e.g. 0x2603 for U+2603 SNOWMAN), or the character encoded as a UTF-8 string (e.g. "\u{2603}")

738 | * 739 | * @return int

The bidirectional category value; one of the following constants: 740 | *

741 | *