{"id":13409386,"url":"https://github.com/voku/portable-utf8","last_synced_at":"2025-05-13T22:03:10.673Z","repository":{"id":458266,"uuid":"20128178","full_name":"voku/portable-utf8","owner":"voku","description":"🉑 Portable UTF-8 library - performance optimized (unicode) string functions for PHP.","archived":false,"fork":false,"pushed_at":"2025-03-19T19:48:38.000Z","size":9159,"stargazers_count":516,"open_issues_count":28,"forks_count":86,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-04-10T00:03:25.093Z","etag":null,"topics":["ascii","hacktoberfest","multibyte","multibyte-strings","php","php7","string","string-encoding","string-manipulation","unicode","utf-8","utf8"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voku.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["voku"],"patreon":"voku","open_collective":"portable-utf8","tidelift":"packagist/voku/portable-utf8","custom":"https://www.paypal.me/moelleken"}},"created_at":"2014-05-24T11:37:29.000Z","updated_at":"2025-04-05T21:32:37.000Z","dependencies_parsed_at":"2023-09-23T14:36:28.401Z","dependency_job_id":"708d82d8-92c1-4465-9382-f5dc03fafa10","html_url":"https://github.com/voku/portable-utf8","commit_stats":{"total_commits":1206,"total_committers":31,"mean_commits":"38.903225806451616","dds":0.7006633499170812,"last_synced_commit":"a1333ac203e721b4089de6a9f2f42e0842fb6dca"},"previous_names":[],"tags_count":235,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voku%2Fportable-utf8","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voku%2Fportable-utf8/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voku%2Fportable-utf8/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voku%2Fportable-utf8/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voku","download_url":"https://codeload.github.com/voku/portable-utf8/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131320,"owners_count":21052819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ascii","hacktoberfest","multibyte","multibyte-strings","php","php7","string","string-encoding","string-manipulation","unicode","utf-8","utf8"],"created_at":"2024-07-30T20:01:00.372Z","updated_at":"2025-04-10T00:03:40.536Z","avatar_url":"https://github.com/voku.png","language":"PHP","funding_links":["https://github.com/sponsors/voku","https://patreon.com/voku","https://opencollective.com/portable-utf8","https://tidelift.com/funding/github/packagist/voku/portable-utf8","https://www.paypal.me/moelleken","https://www.patreon.com/voku"],"categories":["Table of Contents","目录","PHP"],"sub_categories":["Strings","字符串 Strings","Library"],"readme":"[//]: # (AUTO-GENERATED BY \"PHP README Helper\": base file -\u003e docs/base.md)\n[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)\n\n[![Build Status](https://github.com/voku/portable-utf8/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/voku/portable-utf8/actions)\n[![Build status](https://ci.appveyor.com/api/projects/status/gnejjnk7qplr7f5t/branch/master?svg=true)](https://ci.appveyor.com/project/voku/portable-utf8/branch/master)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fvoku%2Fportable-utf8.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fvoku%2Fportable-utf8?ref=badge_shield)\n[![codecov.io](https://codecov.io/github/voku/portable-utf8/coverage.svg?branch=master)](https://codecov.io/github/voku/portable-utf8?branch=master)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/997c9bb10d1c4791967bdf2e42013e8e)](https://www.codacy.com/app/voku/portable-utf8)\n[![Latest Stable Version](https://poser.pugx.org/voku/portable-utf8/v/stable)](https://packagist.org/packages/voku/portable-utf8) \n[![Total Downloads](https://poser.pugx.org/voku/portable-utf8/downloads)](https://packagist.org/packages/voku/portable-utf8)\n[![License](https://poser.pugx.org/voku/portable-utf8/license)](https://packagist.org/packages/voku/portable-utf8)\n[![Donate to this project using PayPal](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.me/moelleken)\n[![Donate to this project using Patreon](https://img.shields.io/badge/patreon-donate-yellow.svg)](https://www.patreon.com/voku)\n\n# 🉑 Portable UTF-8\n\n## Description\n\nIt is written in PHP (PHP 7+) and can work without \"mbstring\", \"iconv\" or any other extra encoding php-extension on your server. \n\nThe benefit of Portable UTF-8 is that it is easy to use, easy to bundle. This library will also \nauto-detect your server environment and will use the installed php-extensions if they are available, \nso you will have the best possible performance.\n\nAs a fallback we will use Symfony Polyfills, if needed. (https://github.com/symfony/polyfill)\n\nThe project based on ...\n+ Hamid Sarfraz's work - [portable-utf8](http://pageconfig.com/attachments/portable-utf8.php) \n+ Nicolas Grekas's work - [tchwork/utf8](https://github.com/tchwork/utf8) \n+ Behat's work - [Behat/Transliterator](https://github.com/Behat/Transliterator) \n+ Sebastián Grignoli's work - [neitanod/forceutf8](https://github.com/neitanod/forceutf8) \n+ Ivan Enderlin's work - [hoaproject/Ustring](https://github.com/hoaproject/Ustring)\n+ and many cherry-picks from \"GitHub\"-gists and \"Stack Overflow\"-snippets ...\n\n## Demo\n\nHere you can test some basic functions from this library and you can compare some results with the native php function results.\n\n+ [encoder.suckup.de](https://encoder.suckup.de/)\n\n## Index\n\n* [Alternative](#alternative)\n* [Install](#install-portable-utf-8-via-composer-require)\n* [Why Portable UTF-8?](#why-portable-utf-8)\n* [Requirements and Recommendations](#requirements-and-recommendations)\n* [Warning](#warning)\n* [Usage](#usage)\n* [Class methods](#class-methods)\n* [Unit Test](#unit-test)\n* [License and Copyright](#license-and-copyright)\n\n## Alternative\n\nIf you like a more Object Oriented Way to edit strings, then you can take a look at [voku/Stringy](https://github.com/voku/Stringy), it's a fork of \"danielstjules/Stringy\" but it used the \"Portable UTF-8\"-Class and some extra methods. \n\n```php\n// Standard library\nstrtoupper('fòôbàř');       // 'FòôBàř'\nstrlen('fòôbàř');           // 10\n\n// mbstring \n// WARNING: if you don't use a polyfill like \"Portable UTF-8\", you need to install the php-extension \"mbstring\" on your server\nmb_strtoupper('fòôbàř');    // 'FÒÔBÀŘ'\nmb_strlen('fòôbàř');        // '6'\n\n// Portable UTF-8\nuse voku\\helper\\UTF8;\nUTF8::strtoupper('fòôbàř');    // 'FÒÔBÀŘ'\nUTF8::strlen('fòôbàř');        // '6'\n\n// voku/Stringy\nuse Stringy\\Stringy as S;\n$stringy = S::create('fòôbàř');\n$stringy-\u003etoUpperCase();    // 'FÒÔBÀŘ'\n$stringy-\u003elength();         // '6'\n```\n\n\n## Install \"Portable UTF-8\" via \"composer require\"\n```shell\ncomposer require voku/portable-utf8\n```\n\nIf your project do not need some of the Symfony polyfills please use the `replace` section of your `composer.json`. \nThis removes any overhead from these polyfills as they are no longer part of your project. e.g.:\n```json\n{\n  \"replace\": {\n    \"symfony/polyfill-php72\": \"1.99\",\n    \"symfony/polyfill-iconv\": \"1.99\",\n    \"symfony/polyfill-intl-grapheme\": \"1.99\",\n    \"symfony/polyfill-intl-normalizer\": \"1.99\",\n    \"symfony/polyfill-mbstring\": \"1.99\"\n  }\n}\n```\n\n##  Why Portable UTF-8?[]()\nPHP 5 and earlier versions have no native Unicode support. To bridge the gap, there exist several extensions like \"mbstring\", \"iconv\" and \"intl\".\n\nThe problem with \"mbstring\" and others is that most of the time you cannot ensure presence of a specific one on a server. If you rely on one of these, your application is no more portable. This problem gets even severe for open source applications that have to run on different servers with different configurations. Considering these, I decided to write a library:\n\n## Requirements and Recommendations\n\n*   No extensions are required to run this library. Portable UTF-8 only needs PCRE library that is available by default since PHP 4.2.0 and cannot be disabled since PHP 5.3.0. \"\\u\" modifier support in PCRE for UTF-8 handling is not a must.\n*   PHP 5.3 is the minimum requirement, and all later versions are fine with Portable UTF-8.\n*   PHP 7.0 is the minimum requirement since version 4.0 of Portable UTF-8, otherwise composer will install an older version\n*   PHP 8.0 support is also available and will adapt the behaviours of the native functions.\n*   To speed up string handling, it is recommended that you have \"mbstring\" or \"iconv\" available on your server, as well as the latest version of PCRE library\n*   Although Portable UTF-8 is easy to use; moving from native API to Portable UTF-8 may not be straight-forward for everyone. It is highly recommended that you do not update your scripts to include Portable UTF-8 or replace or change anything before you first know the reason and consequences. Most of the time, some native function may be all what you need.\n*   There is also a shim for \"mbstring\", \"iconv\" and \"intl\", so you can use it also on shared webspace. \n\n## Usage\n\nExample 1: UTF8::cleanup()\n```php\n  echo UTF8::cleanup('�DÃ¼sseldorf�');\n  \n  // will output:\n  // Düsseldorf\n```\n\nExample 2: UTF8::strlen()\n```php\n  $string = 'string \u003cstrong\u003ewith utf-8 chars åèä\u003c/strong\u003e - doo-bee doo-bee dooh';\n\n  echo strlen($string) . \"\\n\u003cbr /\u003e\";\n  echo UTF8::strlen($string) . \"\\n\u003cbr /\u003e\";\n\n  // will output:\n  // 70\n  // 67\n\n  $string_test1 = strip_tags($string);\n  $string_test2 = UTF8::strip_tags($string);\n\n  echo strlen($string_test1) . \"\\n\u003cbr /\u003e\";\n  echo UTF8::strlen($string_test2) . \"\\n\u003cbr /\u003e\";\n\n  // will output:\n  // 53\n  // 50\n```\n\nExample 3: UTF8::fix_utf8()\n```php\n\n  echo UTF8::fix_utf8('DÃ¼sseldorf');\n  echo UTF8::fix_utf8('Ã¤');\n  \n  // will output:\n  // Düsseldorf\n  // ä\n```\n\n# Portable UTF-8 | API\n\nThe API from the \"UTF8\"-Class is written as small static methods that will match the default PHP-API.\n\n\n## Class methods\n\n\u003cp id=\"voku-php-readme-class-methods\"\u003e\u003c/p\u003e\u003ctable\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#accessstring-str-int-pos-string-encoding-string\"\u003eaccess\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#add_bom_to_stringstring-str-non-empty-string\"\u003eadd_bom_to_string\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#array_change_key_casearray-array-int-case-string-encoding-string\"\u003earray_change_key_case\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#betweenstring-str-string-start-string-end-int-offset-string-encoding-string\"\u003ebetween\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#binary_to_strstring-bin-string\"\u003ebinary_to_str\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#bom-non-empty-string\"\u003ebom\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#callbackcallablestring-string-callback-string-str-string\"\u003ecallback\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#char_atstring-str-int-index-string-encoding-string\"\u003echar_at\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#charsstring-str-string\"\u003echars\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#checkforsupport-truenull\"\u003echeckForSupport\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#chrint-code_point-string-encoding-stringnull\"\u003echr\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#chr_mapcallablestring-string-callback-string-str-string\"\u003echr_map\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#chr_size_liststring-str-int\"\u003echr_size_list\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#chr_to_decimalstring-char-int\"\u003echr_to_decimal\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#chr_to_hexintstring-char-string-prefix-string\"\u003echr_to_hex\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#chunk_splitstring-str-int-chunk_length-string-end-string\"\u003echunk_split\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#cleanstring-str-bool-remove_bom-bool-normalize_whitespace-bool-normalize_msword-bool-keep_non_breaking_space-bool-replace_diamond_question_mark-bool-remove_invisible_characters-bool-remove_invisible_characters_url_encoded-string\"\u003eclean\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#cleanupstring-str-string\"\u003ecleanup\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#codepointsstringstring-arg-bool-use_u_style-intstring\"\u003ecodepoints\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#collapse_whitespacestring-str-string\"\u003ecollapse_whitespace\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#count_charsstring-str-bool-clean_utf8-bool-try_to_use_mb_functions-int\"\u003ecount_chars\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#css_identifierstring-str-string-filter-bool-strip_tags-bool-strtolower-string\"\u003ecss_identifier\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#css_stripe_media_queriesstring-str-string\"\u003ecss_stripe_media_queries\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#ctype_loaded-bool\"\u003ectype_loaded\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#decimal_to_chrintstring-int-string\"\u003edecimal_to_chr\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#decode_mimeheaderstring-str-string-encoding-falsestring\"\u003edecode_mimeheader\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#emoji_decodestring-str-bool-use_reversible_string_mappings-string\"\u003eemoji_decode\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#emoji_encodestring-str-bool-use_reversible_string_mappings-string\"\u003eemoji_encode\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#emoji_from_country_codestring-country_code_iso_3166_1-string\"\u003eemoji_from_country_code\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#encodestring-to_encoding-string-str-bool-auto_detect_the_from_encoding-string-from_encoding-string\"\u003eencode\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#encode_mimeheaderstring-str-string-from_charset-string-to_charset-string-transfer_encoding-string-linefeed-int-indent-falsestring\"\u003eencode_mimeheader\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#extract_textstring-str-string-search-intnull-length-string-replacer_for_skipped_text-string-encoding-string\"\u003eextract_text\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#file_get_contentsstring-filename-bool-use_include_path-resourcenull-context-intnull-offset-intnull-max_length-int-timeout-bool-convert_to_utf8-string-from_encoding-falsestring\"\u003efile_get_contents\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#file_has_bomstring-file_path-bool\"\u003efile_has_bom\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#filterarrayobjectstring-var-int-normalization_form-string-leading_combining-mixed\"\u003efilter\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#filter_inputint-type-string-variable_name-int-filter-intintnull-options-mixed\"\u003efilter_input\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#filter_input_arrayint-type-arraynull-definition-bool-add_empty-arraystringmixedfalsenull\"\u003efilter_input_array\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#filter_varfloatintstringnull-variable-int-filter-intint-options-mixed\"\u003efilter_var\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#filter_var_arrayarray-data-arrayint-definition-bool-add_empty-arraystringmixedfalsenull\"\u003efilter_var_array\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#finfo_loaded-bool\"\u003efinfo_loaded\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#first_charstring-str-int-n-string-encoding-string\"\u003efirst_char\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#fits_insidestring-str-int-box_size-bool\"\u003efits_inside\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#fix_simple_utf8string-str-string\"\u003efix_simple_utf8\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#fix_utf8stringstring-str-stringstring\"\u003efix_utf8\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#getchardirectionstring-char-string\"\u003egetCharDirection\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#getsupportinfostringnull-key-mixed\"\u003egetSupportInfo\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#geturlparamfromarraystring-param-array-data-mixed\"\u003egetUrlParamFromArray\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#get_file_typestring-str-array-fallback\"\u003eget_file_type\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#get_random_stringint-length-string-possible_chars-string-encoding-string\"\u003eget_random_string\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#get_unique_stringintstring-extra_entropy-bool-use_md5-non-empty-string\"\u003eget_unique_string\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#has_lowercasestring-str-bool\"\u003ehas_lowercase\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#has_uppercasestring-str-bool\"\u003ehas_uppercase\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#has_whitespacestring-str-bool\"\u003ehas_whitespace\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#hex_to_chrstring-hexdec-string\"\u003ehex_to_chr\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#hex_to_intstring-hexdec-falseint\"\u003ehex_to_int\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#html_encodestring-str-bool-keep_ascii_chars-string-encoding-string\"\u003ehtml_encode\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#html_entity_decodestring-str-intnull-flags-string-encoding-string\"\u003ehtml_entity_decode\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#html_escapestring-str-string-encoding-string\"\u003ehtml_escape\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#html_stripe_empty_tagsstring-str-string\"\u003ehtml_stripe_empty_tags\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#htmlentitiesstring-str-int-flags-string-encoding-bool-double_encode-string\"\u003ehtmlentities\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#htmlspecialcharsstring-str-int-flags-string-encoding-bool-double_encode-string\"\u003ehtmlspecialchars\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#iconv_loaded-bool\"\u003eiconv_loaded\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#int_to_hexint-int-string-prefix-string\"\u003eint_to_hex\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#intlchar_loaded-bool\"\u003eintlChar_loaded\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#intl_loaded-bool\"\u003eintl_loaded\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#is_alphastring-str-bool\"\u003eis_alpha\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#is_alphanumericstring-str-bool\"\u003eis_alphanumeric\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#is_asciistring-str-bool\"\u003eis_ascii\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#is_base64stringnull-str-bool-empty_string_is_valid-bool\"\u003eis_base64\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#is_binaryintstring-input-bool-strict-bool\"\u003eis_binary\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#is_binary_filestring-file-bool\"\u003eis_binary_file\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#is_blankstring-str-bool\"\u003eis_blank\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#is_bomstring-str-bool\"\u003eis_bom\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#is_emptyarrayfloatintstring-str-bool\"\u003eis_empty\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#is_hexadecimalstring-str-bool\"\u003eis_hexadecimal\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#is_htmlstring-str-bool\"\u003eis_html\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#is_jsonstring-str-bool-only_array_or_object_results_are_valid-bool\"\u003eis_json\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#is_lowercasestring-str-bool\"\u003eis_lowercase\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#is_printablestring-str-bool-ignore_control_characters-bool\"\u003eis_printable\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#is_punctuationstring-str-bool\"\u003eis_punctuation\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#is_serializedstring-str-bool\"\u003eis_serialized\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#is_uppercasestring-str-bool\"\u003eis_uppercase\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#is_urlstring-url-bool-disallow_localhost-bool\"\u003eis_url\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#is_utf8intstringstringnull-str-bool-strict-bool\"\u003eis_utf8\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#is_utf16string-str-bool-check_if_string_is_binary-falseint\"\u003eis_utf16\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#is_utf32string-str-bool-check_if_string_is_binary-falseint\"\u003eis_utf32\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#json_decodestring-json-bool-assoc-int-depth-int-options-mixed\"\u003ejson_decode\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#json_encodemixed-value-int-options-int-depth-falsestring\"\u003ejson_encode\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#json_loaded-bool\"\u003ejson_loaded\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#lcfirststring-str-string-encoding-bool-clean_utf8-stringnull-lang-bool-try_to_keep_the_string_length-string\"\u003elcfirst\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#lcwordsstring-str-string-exceptions-string-char_list-string-encoding-bool-clean_utf8-stringnull-lang-bool-try_to_keep_the_string_length-string\"\u003elcwords\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#levenshteinstring-str1-string-str2-int-insertioncost-int-replacementcost-int-deletioncost-int\"\u003elevenshtein\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#ltrimstring-str-stringnull-chars-string\"\u003eltrim\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#maxstringstring-arg-stringnull\"\u003emax\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#max_chr_widthstring-str-int\"\u003emax_chr_width\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#mbstring_loaded-bool\"\u003embstring_loaded\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#minstringstring-arg-stringnull\"\u003emin\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#normalize_encodingmixed-encoding-mixed-fallback-mixedstring\"\u003enormalize_encoding\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#normalize_line_endingstring-str-stringstring-replacer-string\"\u003enormalize_line_ending\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#normalize_mswordstring-str-string\"\u003enormalize_msword\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#normalize_whitespacestring-str-bool-keep_non_breaking_space-bool-keep_bidi_unicode_controls-bool-normalize_control_characters-string\"\u003enormalize_whitespace\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#ordstring-chr-string-encoding-int\"\u003eord\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#parse_strstring-str-array-result-bool-clean_utf8-bool\"\u003eparse_str\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#pcre_utf8_support-bool\"\u003epcre_utf8_support\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#rangeintstring-var1-intstring-var2-bool-use_ctype-string-encoding-floatint-step-liststring\"\u003erange\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#rawurldecodestring-str-bool-multi_decode-string\"\u003erawurldecode\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#regex_replacestring-str-string-pattern-string-replacement-string-options-string-delimiter-string\"\u003eregex_replace\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#remove_bomstring-str-string\"\u003eremove_bom\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#remove_duplicatesstring-str-stringstring-what-string\"\u003eremove_duplicates\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#remove_htmlstring-str-string-allowable_tags-string\"\u003eremove_html\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#remove_html_breaksstring-str-string-replacement-string\"\u003eremove_html_breaks\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#remove_ileftstring-str-string-substring-string-encoding-string\"\u003eremove_ileft\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#remove_invisible_charactersstring-str-bool-url_encoded-string-replacement-bool-keep_basic_control_characters-string\"\u003eremove_invisible_characters\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#remove_irightstring-str-string-substring-string-encoding-string\"\u003eremove_iright\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#remove_leftstring-str-string-substring-string-encoding-string\"\u003eremove_left\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#remove_rightstring-str-string-substring-string-encoding-string\"\u003eremove_right\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#replacestring-str-string-search-string-replacement-bool-case_sensitive-string\"\u003ereplace\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#replace_allstring-str-string-search-stringstring-replacement-bool-case_sensitive-string\"\u003ereplace_all\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#replace_diamond_question_markstring-str-string-replacement_char-bool-process_invalid_utf8_chars-string\"\u003ereplace_diamond_question_mark\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#rtrimstring-str-stringnull-chars-string\"\u003ertrim\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#showsupportbool-useecho-stringvoid\"\u003eshowSupport\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#single_chr_html_encodestring-char-bool-keep_ascii_chars-string-encoding-string\"\u003esingle_chr_html_encode\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#spaces_to_tabsstring-str-int-tab_length-string\"\u003espaces_to_tabs\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_camelizestring-str-string-encoding-bool-clean_utf8-stringnull-lang-bool-try_to_keep_the_string_length-string\"\u003estr_camelize\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#str_capitalize_namestring-str-string\"\u003estr_capitalize_name\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_containsstring-haystack-string-needle-bool-case_sensitive-bool\"\u003estr_contains\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_contains_allstring-haystack-scalar-needles-bool-case_sensitive-bool\"\u003estr_contains_all\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_contains_anystring-haystack-scalar-needles-bool-case_sensitive-bool\"\u003estr_contains_any\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#str_dasherizestring-str-string-encoding-string\"\u003estr_dasherize\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_delimitstring-str-string-delimiter-string-encoding-bool-clean_utf8-stringnull-lang-bool-try_to_keep_the_string_length-string\"\u003estr_delimit\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_detect_encodingstring-str-falsestring\"\u003estr_detect_encoding\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_ends_withstring-haystack-string-needle-bool\"\u003estr_ends_with\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#str_ends_with_anystring-str-string-substrings-bool\"\u003estr_ends_with_any\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_ensure_leftstring-str-string-substring\"\u003estr_ensure_left\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_ensure_rightstring-str-string-substring-string\"\u003estr_ensure_right\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_humanizestring-str-string\"\u003estr_humanize\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#str_iends_withstring-haystack-string-needle-bool\"\u003estr_iends_with\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_iends_with_anystring-str-string-substrings-bool\"\u003estr_iends_with_any\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_insertstring-str-string-substring-int-index-string-encoding-string\"\u003estr_insert\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_ireplacestringstring-search-stringstring-replacement-stringstring-subject-int-count-stringstring\"\u003estr_ireplace\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#str_ireplace_beginningstring-str-string-search-string-replacement-string\"\u003estr_ireplace_beginning\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_ireplace_endingstring-str-string-search-string-replacement-string\"\u003estr_ireplace_ending\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_istarts_withstring-haystack-string-needle-bool\"\u003estr_istarts_with\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_istarts_with_anystring-str-scalar-substrings-bool\"\u003estr_istarts_with_any\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#str_isubstr_after_first_separatorstring-str-string-separator-string-encoding-string\"\u003estr_isubstr_after_first_separator\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_isubstr_after_last_separatorstring-str-string-separator-string-encoding-string\"\u003estr_isubstr_after_last_separator\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_isubstr_before_first_separatorstring-str-string-separator-string-encoding-string\"\u003estr_isubstr_before_first_separator\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_isubstr_before_last_separatorstring-str-string-separator-string-encoding-string\"\u003estr_isubstr_before_last_separator\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#str_isubstr_firststring-str-string-needle-bool-before_needle-string-encoding-string\"\u003estr_isubstr_first\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_isubstr_laststring-str-string-needle-bool-before_needle-string-encoding-string\"\u003estr_isubstr_last\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_last_charstring-str-int-n-string-encoding-string\"\u003estr_last_char\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_limitstring-str-int-length-string-str_add_on-string-encoding-string\"\u003estr_limit\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#str_limit_after_wordstring-str-int-length-string-str_add_on-string-encoding-string\"\u003estr_limit_after_word\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_longest_common_prefixstring-str1-string-str2-string-encoding-string\"\u003estr_longest_common_prefix\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_longest_common_substringstring-str1-string-str2-string-encoding-string\"\u003estr_longest_common_substring\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_longest_common_suffixstring-str1-string-str2-string-encoding-string\"\u003estr_longest_common_suffix\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#str_matches_patternstring-str-string-pattern-bool\"\u003estr_matches_pattern\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_obfuscatestring-str-float-percent-string-obfuscatechar-string-keepchars-string\"\u003estr_obfuscate\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_offset_existsstring-str-int-offset-string-encoding-bool\"\u003estr_offset_exists\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_offset_getstring-str-int-index-string-encoding-string\"\u003estr_offset_get\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#str_padstring-str-int-pad_length-string-pad_string-intstring-pad_type-string-encoding-string\"\u003estr_pad\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_pad_bothstring-str-int-length-string-pad_str-string-encoding-string\"\u003estr_pad_both\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_pad_leftstring-str-int-length-string-pad_str-string-encoding-string\"\u003estr_pad_left\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_pad_rightstring-str-int-length-string-pad_str-string-encoding-string\"\u003estr_pad_right\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#str_repeatstring-str-int-multiplier-string\"\u003estr_repeat\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_replace_beginningstring-str-string-search-string-replacement-string\"\u003estr_replace_beginning\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_replace_endingstring-str-string-search-string-replacement-string\"\u003estr_replace_ending\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_replace_firststring-search-string-replace-string-subject-string\"\u003estr_replace_first\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#str_replace_laststring-search-string-replace-string-subject-string\"\u003estr_replace_last\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_shufflestring-str-string-encoding-string\"\u003estr_shuffle\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_slicestring-str-int-start-intnull-end-string-encoding-falsestring\"\u003estr_slice\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_snakeizestring-str-string-encoding-string\"\u003estr_snakeize\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#str_sortstring-str-bool-unique-bool-desc-string\"\u003estr_sort\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_splitintstring-str-int-length-bool-clean_utf8-bool-try_to_use_mb_functions-liststring\"\u003estr_split\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_split_arrayintstring-input-int-length-bool-clean_utf8-bool-try_to_use_mb_functions-listliststring\"\u003estr_split_array\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_split_patternstring-str-string-pattern-int-limit-string\"\u003estr_split_pattern\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#str_starts_withstring-haystack-string-needle-bool\"\u003estr_starts_with\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_starts_with_anystring-str-scalar-substrings-bool\"\u003estr_starts_with_any\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_substr_after_first_separatorstring-str-string-separator-string-encoding-string\"\u003estr_substr_after_first_separator\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_substr_after_last_separatorstring-str-string-separator-string-encoding-string\"\u003estr_substr_after_last_separator\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#str_substr_before_first_separatorstring-str-string-separator-string-encoding-string\"\u003estr_substr_before_first_separator\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_substr_before_last_separatorstring-str-string-separator-string-encoding-string\"\u003estr_substr_before_last_separator\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_substr_firststring-str-string-needle-bool-before_needle-string-encoding-string\"\u003estr_substr_first\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_substr_laststring-str-string-needle-bool-before_needle-string-encoding-string\"\u003estr_substr_last\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#str_surroundstring-str-string-substring-string\"\u003estr_surround\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_titleizestring-str-stringnull-ignore-string-encoding-bool-clean_utf8-stringnull-lang-bool-try_to_keep_the_string_length-bool-use_trim_first-stringnull-word_define_chars-string\"\u003estr_titleize\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_titleize_for_humansstring-str-string-ignore-string-encoding-string\"\u003estr_titleize_for_humans\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_to_binarystring-str-falsestring\"\u003estr_to_binary\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#str_to_linesstring-str-bool-remove_empty_values-intnull-remove_short_values-string\"\u003estr_to_lines\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_to_wordsstring-str-string-char_list-bool-remove_empty_values-intnull-remove_short_values-liststring\"\u003estr_to_words\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_truncatestring-str-int-length-string-substring-string-encoding-string\"\u003estr_truncate\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_truncate_safestring-str-int-length-string-substring-string-encoding-bool-ignore_do_not_split_words_for_one_word-string\"\u003estr_truncate_safe\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#str_underscoredstring-str-string\"\u003estr_underscored\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_upper_camelizestring-str-string-encoding-bool-clean_utf8-stringnull-lang-bool-try_to_keep_the_string_length-string\"\u003estr_upper_camelize\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#str_word_countstring-str-int-format-string-char_list-intstring\"\u003estr_word_count\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#strcasecmpstring-str1-string-str2-string-encoding-int\"\u003estrcasecmp\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#strcmpstring-str1-string-str2-int\"\u003estrcmp\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#strcspnstring-str-string-char_list-int-offset-intnull-length-string-encoding-int\"\u003estrcspn\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#stringintintstringstring-intorhex-string\"\u003estring\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#string_has_bomstring-str-bool\"\u003estring_has_bom\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#strip_tagsstring-str-stringnull-allowable_tags-bool-clean_utf8-string\"\u003estrip_tags\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#strip_whitespacestring-str-string\"\u003estrip_whitespace\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#striposstring-haystack-string-needle-int-offset-string-encoding-bool-clean_utf8-falseint\"\u003estripos\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#stripos_in_bytestring-haystack-string-needle-int-offset-falseint\"\u003estripos_in_byte\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#stristrstring-haystack-string-needle-bool-before_needle-string-encoding-bool-clean_utf8-falsestring\"\u003estristr\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#strlenstring-str-string-encoding-bool-clean_utf8-falseint\"\u003estrlen\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#strlen_in_bytestring-str-int\"\u003estrlen_in_byte\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#strnatcasecmpstring-str1-string-str2-string-encoding-int\"\u003estrnatcasecmp\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#strnatcmpstring-str1-string-str2-int\"\u003estrnatcmp\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#strncasecmpstring-str1-string-str2-int-len-string-encoding-int\"\u003estrncasecmp\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#strncmpstring-str1-string-str2-int-len-string-encoding-int\"\u003estrncmp\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#strpbrkstring-haystack-string-char_list-falsestring\"\u003estrpbrk\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#strposstring-haystack-intstring-needle-int-offset-string-encoding-bool-clean_utf8-falseint\"\u003estrpos\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#strpos_in_bytestring-haystack-string-needle-int-offset-falseint\"\u003estrpos_in_byte\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#strrchrstring-haystack-string-needle-bool-before_needle-string-encoding-bool-clean_utf8-falsestring\"\u003estrrchr\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#strrevstring-str-string-encoding-string\"\u003estrrev\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#strrichrstring-haystack-string-needle-bool-before_needle-string-encoding-bool-clean_utf8-falsestring\"\u003estrrichr\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#strriposstring-haystack-intstring-needle-int-offset-string-encoding-bool-clean_utf8-falseint\"\u003estrripos\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#strripos_in_bytestring-haystack-string-needle-int-offset-falseint\"\u003estrripos_in_byte\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#strrposstring-haystack-intstring-needle-int-offset-string-encoding-bool-clean_utf8-falseint\"\u003estrrpos\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#strrpos_in_bytestring-haystack-string-needle-int-offset-falseint\"\u003estrrpos_in_byte\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#strspnstring-str-string-mask-int-offset-intnull-length-string-encoding-falseint\"\u003estrspn\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#strstrstring-haystack-string-needle-bool-before_needle-string-encoding-bool-clean_utf8-falsestring\"\u003estrstr\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#strstr_in_bytestring-haystack-string-needle-bool-before_needle-falsestring\"\u003estrstr_in_byte\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#strtocasefoldstring-str-bool-full-bool-clean_utf8-string-encoding-stringnull-lang-bool-lower-string\"\u003estrtocasefold\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#strtolowerstring-str-string-encoding-bool-clean_utf8-stringnull-lang-bool-try_to_keep_the_string_length-string\"\u003estrtolower\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#strtoupperstring-str-string-encoding-bool-clean_utf8-stringnull-lang-bool-try_to_keep_the_string_length-string\"\u003estrtoupper\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#strtrstring-str-stringstring-from-stringstring-to-string\"\u003estrtr\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#strwidthstring-str-string-encoding-bool-clean_utf8-int\"\u003estrwidth\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#substrstring-str-int-offset-intnull-length-string-encoding-bool-clean_utf8-falsestring\"\u003esubstr\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#substr_comparestring-str1-string-str2-int-offset-intnull-length-bool-case_insensitivity-string-encoding-int\"\u003esubstr_compare\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#substr_countstring-haystack-string-needle-int-offset-intnull-length-string-encoding-bool-clean_utf8-falseint\"\u003esubstr_count\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#substr_count_in_bytestring-haystack-string-needle-int-offset-intnull-length-falseint\"\u003esubstr_count_in_byte\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#substr_count_simplestring-str-string-substring-bool-case_sensitive-string-encoding-int\"\u003esubstr_count_simple\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#substr_ileftstring-haystack-string-needle-string\"\u003esubstr_ileft\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#substr_in_bytestring-str-int-offset-intnull-length-falsestring\"\u003esubstr_in_byte\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#substr_irightstring-haystack-string-needle-string\"\u003esubstr_iright\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#substr_leftstring-haystack-string-needle-string\"\u003esubstr_left\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#substr_replacestringstring-str-stringstring-replacement-intint-offset-intintnull-length-string-encoding-stringstring\"\u003esubstr_replace\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#substr_rightstring-haystack-string-needle-string-encoding-string\"\u003esubstr_right\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#swapcasestring-str-string-encoding-bool-clean_utf8-string\"\u003eswapCase\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#symfony_polyfill_used-bool\"\u003esymfony_polyfill_used\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#tabs_to_spacesstring-str-int-tab_length-string\"\u003etabs_to_spaces\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#titlecasestring-str-string-encoding-bool-clean_utf8-stringnull-lang-bool-try_to_keep_the_string_length-string\"\u003etitlecase\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#to_asciistring-str-string-unknown-bool-strict-string\"\u003eto_ascii\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#to_booleanboolfloatintstring-str-bool\"\u003eto_boolean\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#to_filenamestring-str-bool-use_transliterate-string-fallback_char-string\"\u003eto_filename\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#to_intstring-str-intnull\"\u003eto_int\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#to_iso8859stringstring-str-stringstring\"\u003eto_iso8859\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#to_stringfloatintobjectstringnull-input-stringnull\"\u003eto_string\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#to_utf8stringstring-str-bool-decode_html_entity_to_utf8-stringstring\"\u003eto_utf8\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#to_utf8_stringstring-str-bool-decode_html_entity_to_utf8-string\"\u003eto_utf8_string\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#trimstring-str-stringnull-chars-string\"\u003etrim\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#ucfirststring-str-string-encoding-bool-clean_utf8-stringnull-lang-bool-try_to_keep_the_string_length-string\"\u003eucfirst\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#ucwordsstring-str-string-exceptions-string-char_list-string-encoding-bool-clean_utf8-string\"\u003eucwords\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#urldecodestring-str-bool-multi_decode-string\"\u003eurldecode\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#utf8_decodestring-str-bool-keep_utf8_chars-string\"\u003eutf8_decode\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#utf8_encodestring-str-string\"\u003eutf8_encode\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#whitespace_table-string\"\u003ewhitespace_table\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#words_limitstring-str-int-limit-string-str_add_on-string\"\u003ewords_limit\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#wordwrapstring-str-int-width-string-break-bool-cut-string\"\u003ewordwrap\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#wordwrap_per_linestring-str-int-width-string-break-bool-cut-bool-add_final_break-stringnull-delimiter-string\"\u003ewordwrap_per_line\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#ws-string\"\u003ews\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\n## access(string $str, int $pos, string $encoding): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturn the character at the specified position: $str[1] like functionality.\n\nEXAMPLE: \u003ccode\u003eUTF8::access('fòô', 1); // 'ò'\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003eA UTF-8 string.\u003c/p\u003e`\n- `int $pos \u003cp\u003eThe position of character to return.\u003c/p\u003e`\n- `string $encoding [optional] \u003cp\u003eSet the charset for e.g. \"mb_\" function\u003c/p\u003e`\n\n**Return:**\n- `string \u003cp\u003eSingle multi-byte character.\u003c/p\u003e`\n\n--------\n\n## add_bom_to_string(string $str): non-empty-string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nPrepends UTF-8 BOM character to the string and returns the whole string.\n\nINFO: If BOM already existed there, the Input string is returned.\n\nEXAMPLE: \u003ccode\u003eUTF8::add_bom_to_string('fòô'); // \"\\xEF\\xBB\\xBF\" . 'fòô'\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n\n**Return:**\n- `non-empty-string \u003cp\u003eThe output string that contains BOM.\u003c/p\u003e`\n\n--------\n\n## array_change_key_case(array $array, int $case, string $encoding): string[]\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nChanges all keys in an array.\n\n**Parameters:**\n- `array\u003cstring, mixed\u003e $array \u003cp\u003eThe array to work on\u003c/p\u003e`\n- `int $case [optional] \u003cp\u003e Either \u003cstrong\u003eCASE_UPPER\u003c/strong\u003e\u003cbr\u003e\nor \u003cstrong\u003eCASE_LOWER\u003c/strong\u003e (default)\u003c/p\u003e`\n- `string $encoding [optional] \u003cp\u003eSet the charset for e.g. \"mb_\" function\u003c/p\u003e`\n\n**Return:**\n- `string[] \u003cp\u003eAn array with its keys lower- or uppercased.\u003c/p\u003e`\n\n--------\n\n## between(string $str, string $start, string $end, int $offset, string $encoding): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the substring between $start and $end, if found, or an empty\nstring. An optional offset may be supplied from which to begin the\nsearch for the start string.\n\n**Parameters:**\n- `string $str`\n- `string $start \u003cp\u003eDelimiter marking the start of the substring.\u003c/p\u003e`\n- `string $end \u003cp\u003eDelimiter marking the end of the substring.\u003c/p\u003e`\n- `int $offset [optional] \u003cp\u003eIndex from which to begin the search. Default: 0\u003c/p\u003e`\n- `string $encoding [optional] \u003cp\u003eSet the charset for e.g. \"mb_\" function\u003c/p\u003e`\n\n**Return:**\n- `string`\n\n--------\n\n## binary_to_str(string $bin): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nConvert binary into a string.\n\nINFO: opposite to UTF8::str_to_binary()\n\nEXAMPLE: \u003ccode\u003eUTF8::binary_to_str('11110000100111111001100010000011'); // '😃'\u003c/code\u003e\n\n**Parameters:**\n- `string $bin 1|0`\n\n**Return:**\n- `string`\n\n--------\n\n## bom(): non-empty-string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the UTF-8 Byte Order Mark Character.\n\nINFO: take a look at UTF8::$bom for e.g. UTF-16 and UTF-32 BOM values\n\nEXAMPLE: \u003ccode\u003eUTF8::bom(); // \"\\xEF\\xBB\\xBF\"\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `non-empty-string \u003cp\u003eUTF-8 Byte Order Mark.\u003c/p\u003e`\n\n--------\n\n## callback(callable(string): string $callback, string $str): string[]\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\n\n\n**Parameters:**\n- `callable(string): string $callback`\n- `string $str`\n\n**Return:**\n- `string[]`\n\n--------\n\n## char_at(string $str, int $index, string $encoding): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the character at $index, with indexes starting at 0.\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n- `int\u003c1, max\u003e $index \u003cp\u003ePosition of the character.\u003c/p\u003e`\n- `string $encoding [optional] \u003cp\u003eDefault is UTF-8\u003c/p\u003e`\n\n**Return:**\n- `string \u003cp\u003eThe character at $index.\u003c/p\u003e`\n\n--------\n\n## chars(string $str): string[]\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns an array consisting of the characters in the string.\n\n**Parameters:**\n- `T $str \u003cp\u003eThe input string.\u003c/p\u003e`\n\n**Return:**\n- `string[] \u003cp\u003eAn array of chars.\u003c/p\u003e`\n\n--------\n\n## checkForSupport(): true|null\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nThis method will auto-detect your server environment for UTF-8 support.\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `true|null`\n\n--------\n\n## chr(int $code_point, string $encoding): string|null\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nGenerates a UTF-8 encoded character from the given code point.\n\nINFO: opposite to UTF8::ord()\n\nEXAMPLE: \u003ccode\u003eUTF8::chr(0x2603); // '☃'\u003c/code\u003e\n\n**Parameters:**\n- `int $code_point \u003cp\u003eThe code point for which to generate a character.\u003c/p\u003e`\n- `string $encoding [optional] \u003cp\u003eDefault is UTF-8\u003c/p\u003e`\n\n**Return:**\n- `string|null \u003cp\u003eMulti-byte character, returns null on failure or empty input.\u003c/p\u003e`\n\n--------\n\n## chr_map(callable(string): string $callback, string $str): string[]\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nApplies callback to all characters of a string.\n\nEXAMPLE: \u003ccode\u003eUTF8::chr_map([UTF8::class, 'strtolower'], 'Κόσμε'); // ['κ','ό', 'σ', 'μ', 'ε']\u003c/code\u003e\n\n**Parameters:**\n- `callable(string): string $callback`\n- `string $str \u003cp\u003eUTF-8 string to run callback on.\u003c/p\u003e`\n\n**Return:**\n- `string[] \u003cp\u003eThe outcome of the callback, as array.\u003c/p\u003e`\n\n--------\n\n## chr_size_list(string $str): int[]\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nGenerates an array of byte length of each character of a Unicode string.\n\n1 byte =\u003e U+0000  - U+007F\n2 byte =\u003e U+0080  - U+07FF\n3 byte =\u003e U+0800  - U+FFFF\n4 byte =\u003e U+10000 - U+10FFFF\n\nEXAMPLE: \u003ccode\u003eUTF8::chr_size_list('中文空白-test'); // [3, 3, 3, 3, 1, 1, 1, 1, 1]\u003c/code\u003e\n\n**Parameters:**\n- `T $str \u003cp\u003eThe original unicode string.\u003c/p\u003e`\n\n**Return:**\n- `int[] \u003cp\u003eAn array of byte lengths of each character.\u003c/p\u003e`\n\n--------\n\n## chr_to_decimal(string $char): int\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nGet a decimal code representation of a specific character.\n\nINFO: opposite to UTF8::decimal_to_chr()\n\nEXAMPLE: \u003ccode\u003eUTF8::chr_to_decimal('§'); // 0xa7\u003c/code\u003e\n\n**Parameters:**\n- `string $char \u003cp\u003eThe input character.\u003c/p\u003e`\n\n**Return:**\n- `int`\n\n--------\n\n## chr_to_hex(int|string $char, string $prefix): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nGet hexadecimal code point (U+xxxx) of a UTF-8 encoded character.\n\nEXAMPLE: \u003ccode\u003eUTF8::chr_to_hex('§'); // U+00a7\u003c/code\u003e\n\n**Parameters:**\n- `int|string $char \u003cp\u003eThe input character\u003c/p\u003e`\n- `string $prefix [optional]`\n\n**Return:**\n- `string \u003cp\u003eThe code point encoded as U+xxxx.\u003c/p\u003e`\n\n--------\n\n## chunk_split(string $str, int $chunk_length, string $end): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nSplits a string into smaller chunks and multiple lines, using the specified line ending character.\n\nEXAMPLE: \u003ccode\u003eUTF8::chunk_split('ABC-ÖÄÜ-中文空白-κόσμε', 3); // \"ABC\\r\\n-ÖÄ\\r\\nÜ-中\\r\\n文空白\\r\\n-κό\\r\\nσμε\"\u003c/code\u003e\n\n**Parameters:**\n- `T $str \u003cp\u003eThe original string to be split.\u003c/p\u003e`\n- `int\u003c1, max\u003e $chunk_length [optional] \u003cp\u003eThe maximum character length of a chunk.\u003c/p\u003e`\n- `string $end [optional] \u003cp\u003eThe character(s) to be inserted at the end of each chunk.\u003c/p\u003e`\n\n**Return:**\n- `string \u003cp\u003eThe chunked string.\u003c/p\u003e`\n\n--------\n\n## clean(string $str, bool $remove_bom, bool $normalize_whitespace, bool $normalize_msword, bool $keep_non_breaking_space, bool $replace_diamond_question_mark, bool $remove_invisible_characters, bool $remove_invisible_characters_url_encoded): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nAccepts a string and removes all non-UTF-8 characters from it + extras if needed.\n\nEXAMPLE: \u003ccode\u003eUTF8::clean(\"\\xEF\\xBB\\xBF„Abcdef\\xc2\\xa0\\x20…” — 😃 - DÃ¼sseldorf\", true, true); // '„Abcdef  …” — 😃 - DÃ¼sseldorf'\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003eThe string to be sanitized.\u003c/p\u003e`\n- `bool $remove_bom [optional] \u003cp\u003eSet to true, if you need to remove\nUTF-BOM.\u003c/p\u003e`\n- `bool $normalize_whitespace [optional] \u003cp\u003eSet to true, if you need to normalize the\nwhitespace.\u003c/p\u003e`\n- `bool $normalize_msword [optional] \u003cp\u003eSet to true, if you need to normalize MS\nWord chars e.g.: \"…\"\n=\u003e \"...\"\u003c/p\u003e`\n- `bool $keep_non_breaking_space [optional] \u003cp\u003eSet to true, to keep non-breaking-spaces,\nin\ncombination with\n$normalize_whitespace\u003c/p\u003e`\n- `bool $replace_diamond_question_mark [optional] \u003cp\u003eSet to true, if you need to remove diamond\nquestion mark e.g.: \"�\"\u003c/p\u003e`\n- `bool $remove_invisible_characters [optional] \u003cp\u003eSet to false, if you not want to remove\ninvisible characters e.g.: \"\\0\"\u003c/p\u003e`\n- `bool $remove_invisible_characters_url_encoded [optional] \u003cp\u003eSet to true, if you not want to remove\ninvisible url encoded characters e.g.: \"%0B\"\u003cbr\u003e WARNING:\nmaybe contains false-positives e.g. aa%0Baa -\u003e aaaa.\n\u003c/p\u003e`\n\n**Return:**\n- `string \u003cp\u003eAn clean UTF-8 encoded string.\u003c/p\u003e`\n\n--------\n\n## cleanup(string $str): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nClean-up a string and show only printable UTF-8 chars at the end  + fix UTF-8 encoding.\n\nEXAMPLE: \u003ccode\u003eUTF8::cleanup(\"\\xEF\\xBB\\xBF„Abcdef\\xc2\\xa0\\x20…” — 😃 - DÃ¼sseldorf\", true, true); // '„Abcdef  …” — 😃 - Düsseldorf'\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n\n**Return:**\n- `string`\n\n--------\n\n## codepoints(string|string[] $arg, bool $use_u_style): int[]|string[]\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nAccepts a string or an array of chars and returns an array of Unicode code points.\n\nINFO: opposite to UTF8::string()\n\nEXAMPLE: \u003ccode\u003e\nUTF8::codepoints('κöñ'); // array(954, 246, 241)\n// ... OR ...\nUTF8::codepoints('κöñ', true); // array('U+03ba', 'U+00f6', 'U+00f1')\n\u003c/code\u003e\n\n**Parameters:**\n- `T $arg \u003cp\u003eA UTF-8 encoded string or an array of such chars.\u003c/p\u003e`\n- `bool $use_u_style \u003cp\u003eIf True, will return code points in U+xxxx format,\ndefault, code points will be returned as integers.\u003c/p\u003e`\n\n**Return:**\n- `int[]|string[] \u003cp\u003e\nThe array of code points:\u003cbr\u003e\nint[] for $u_style === false\u003cbr\u003e\nstring[] for $u_style === true\u003cbr\u003e\n\u003c/p\u003e`\n\n--------\n\n## collapse_whitespace(string $str): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nTrims the string and replaces consecutive whitespace characters with a\nsingle space. This includes tabs and newline characters, as well as\nmultibyte whitespace such as the thin space and ideographic space.\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n\n**Return:**\n- `string \u003cp\u003eA string with trimmed $str and condensed whitespace.\u003c/p\u003e`\n\n--------\n\n## count_chars(string $str, bool $clean_utf8, bool $try_to_use_mb_functions): int[]\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns count of characters used in a string.\n\nEXAMPLE: \u003ccode\u003eUTF8::count_chars('κaκbκc'); // array('κ' =\u003e 3, 'a' =\u003e 1, 'b' =\u003e 1, 'c' =\u003e 1)\u003c/code\u003e\n\n**Parameters:**\n- `T $str \u003cp\u003eThe input string.\u003c/p\u003e`\n- `bool $clean_utf8 [optional] \u003cp\u003eRemove non UTF-8 chars from the string.\u003c/p\u003e`\n- `bool $try_to_use_mb_functions [optional] \u003cp\u003eSet to false, if you don't want to use`\n\n**Return:**\n- `int[] \u003cp\u003eAn associative array of Character as keys and\ntheir count as values.\u003c/p\u003e`\n\n--------\n\n## css_identifier(string $str, string[] $filter, bool $strip_tags, bool $strtolower): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCreate a valid CSS identifier for e.g. \"class\"- or \"id\"-attributes.\n\nEXAMPLE: \u003ccode\u003eUTF8::css_identifier('123foo/bar!!!'); // _23foo-bar\u003c/code\u003e\n\ncopy\u0026past from https://github.com/drupal/core/blob/8.8.x/lib/Drupal/Component/Utility/Html.php#L95\n\n**Parameters:**\n- `string $str \u003cp\u003eINFO: if no identifier is given e.g. \" \" or \"\", we will create a unique string automatically\u003c/p\u003e`\n- `array\u003cstring, string\u003e $filter`\n- `bool $strip_tags`\n- `bool $strtolower`\n\n**Return:**\n- `string`\n\n--------\n\n## css_stripe_media_queries(string $str): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nRemove css media-queries.\n\n**Parameters:**\n- `string $str`\n\n**Return:**\n- `string`\n\n--------\n\n## ctype_loaded(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nChecks whether ctype is available on the server.\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003e\u003cstrong\u003etrue\u003c/strong\u003e if available, \u003cstrong\u003efalse\u003c/strong\u003e otherwise\u003c/p\u003e`\n\n--------\n\n## decimal_to_chr(int|string $int): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nConverts an int value into a UTF-8 character.\n\nINFO: opposite to UTF8::string()\n\nEXAMPLE: \u003ccode\u003eUTF8::decimal_to_chr(931); // 'Σ'\u003c/code\u003e\n\n**Parameters:**\n- `int|string $int`\n\n**Return:**\n- `string`\n\n--------\n\n## decode_mimeheader(string $str, string $encoding): false|string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nDecodes a MIME header field\n\n**Parameters:**\n- `string $str`\n- `string $encoding [optional] \u003cp\u003eSet the charset for e.g. \"mb_\" function\u003c/p\u003e`\n\n**Return:**\n- `false|string \u003cp\u003eA decoded MIME field on success,\nor false if an error occurs during the decoding.\u003c/p\u003e`\n\n--------\n\n## emoji_decode(string $str, bool $use_reversible_string_mappings): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nDecodes a string which was encoded by \"UTF8::emoji_encode()\".\n\nINFO: opposite to UTF8::emoji_encode()\n\nEXAMPLE: \u003ccode\u003e\nUTF8::emoji_decode('foo CHARACTER_OGRE', false); // 'foo 👹'\n//\nUTF8::emoji_decode('foo _-_PORTABLE_UTF8_-_308095726_-_627590803_-_8FTU_ELBATROP_-_', true); // 'foo 👹'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n- `bool $use_reversible_string_mappings [optional] \u003cp\u003e\nWhen \u003cb\u003eTRUE\u003c/b\u003e, we se a reversible string mapping\nbetween \"emoji_encode\" and \"emoji_decode\".\u003c/p\u003e`\n\n**Return:**\n- `string`\n\n--------\n\n## emoji_encode(string $str, bool $use_reversible_string_mappings): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nEncode a string with emoji chars into a non-emoji string.\n\nINFO: opposite to UTF8::emoji_decode()\n\nEXAMPLE: \u003ccode\u003e\nUTF8::emoji_encode('foo 👹', false)); // 'foo CHARACTER_OGRE'\n//\nUTF8::emoji_encode('foo 👹', true)); // 'foo _-_PORTABLE_UTF8_-_308095726_-_627590803_-_8FTU_ELBATROP_-_'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string\u003c/p\u003e`\n- `bool $use_reversible_string_mappings [optional] \u003cp\u003e\nwhen \u003cb\u003eTRUE\u003c/b\u003e, we use a reversible string mapping\nbetween \"emoji_encode\" and \"emoji_decode\"\u003c/p\u003e`\n\n**Return:**\n- `string`\n\n--------\n\n## emoji_from_country_code(string $country_code_iso_3166_1): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nConvert any two-letter country code (ISO 3166-1) to the corresponding Emoji.\n\n**Parameters:**\n- `string $country_code_iso_3166_1 \u003cp\u003ee.g. DE\u003c/p\u003e`\n\n**Return:**\n- `string \u003cp\u003eEmoji or empty string on error.\u003c/p\u003e`\n\n--------\n\n## encode(string $to_encoding, string $str, bool $auto_detect_the_from_encoding, string $from_encoding): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nEncode a string with a new charset-encoding.\n\nINFO:  This function will also try to fix broken / double encoding,\n       so you can call this function also on a UTF-8 string and you don't mess up the string.\n\nEXAMPLE: \u003ccode\u003e\nUTF8::encode('ISO-8859-1', '-ABC-中文空白-'); // '-ABC-????-'\n//\nUTF8::encode('UTF-8', '-ABC-中文空白-'); // '-ABC-中文空白-'\n//\nUTF8::encode('HTML', '-ABC-中文空白-'); // '-ABC-\u0026#20013;\u0026#25991;\u0026#31354;\u0026#30333;-'\n//\nUTF8::encode('BASE64', '-ABC-中文空白-'); // 'LUFCQy3kuK3mlofnqbrnmb0t'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $to_encoding \u003cp\u003ee.g. 'UTF-16', 'UTF-8', 'ISO-8859-1', etc.\u003c/p\u003e`\n- `string $str \u003cp\u003eThe input string\u003c/p\u003e`\n- `bool $auto_detect_the_from_encoding [optional] \u003cp\u003eForce the new encoding (we try to fix broken / double\nencoding for UTF-8)\u003cbr\u003e otherwise we auto-detect the current\nstring-encoding\u003c/p\u003e`\n- `string $from_encoding [optional] \u003cp\u003ee.g. 'UTF-16', 'UTF-8', 'ISO-8859-1', etc.\u003cbr\u003e\nA empty string will trigger the autodetect anyway.\u003c/p\u003e`\n\n**Return:**\n- `string`\n\n--------\n\n## encode_mimeheader(string $str, string $from_charset, string $to_charset, string $transfer_encoding, string $linefeed, int $indent): false|string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\n\n\n**Parameters:**\n- `string $str`\n- `string $from_charset [optional] \u003cp\u003eSet the input charset.\u003c/p\u003e`\n- `string $to_charset [optional] \u003cp\u003eSet the output charset.\u003c/p\u003e`\n- `string $transfer_encoding [optional] \u003cp\u003eSet the transfer encoding.\u003c/p\u003e`\n- `string $linefeed [optional] \u003cp\u003eSet the used linefeed.\u003c/p\u003e`\n- `int\u003c1, max\u003e $indent [optional] \u003cp\u003eSet the max length indent.\u003c/p\u003e`\n\n**Return:**\n- `false|string \u003cp\u003eAn encoded MIME field on success,\nor false if an error occurs during the encoding.\u003c/p\u003e`\n\n--------\n\n## extract_text(string $str, string $search, int|null $length, string $replacer_for_skipped_text, string $encoding): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCreate an extract from a sentence, so if the search-string was found, it tries to center in the output.\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n- `string $search \u003cp\u003eThe searched string.\u003c/p\u003e`\n- `int|null $length [optional] \u003cp\u003eDefault: null === text-\u003elength / 2\u003c/p\u003e`\n- `string $replacer_for_skipped_text [optional] \u003cp\u003eDefault: …\u003c/p\u003e`\n- `string $encoding [optional] \u003cp\u003eSet the charset for e.g. \"mb_\" function\u003c/p\u003e`\n\n**Return:**\n- `string`\n\n--------\n\n## file_get_contents(string $filename, bool $use_include_path, resource|null $context, int|null $offset, int|null $max_length, int $timeout, bool $convert_to_utf8, string $from_encoding): false|string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReads entire file into a string.\n\nEXAMPLE: \u003ccode\u003eUTF8::file_get_contents('utf16le.txt'); // ...\u003c/code\u003e\n\nWARNING: Do not use UTF-8 Option ($convert_to_utf8) for binary files (e.g.: images) !!!\n\n**Parameters:**\n- `string $filename \u003cp\u003e\nName of the file to read.\n\u003c/p\u003e`\n- `bool $use_include_path [optional] \u003cp\u003e\nPrior to PHP 5, this parameter is called\nuse_include_path and is a bool.\nAs of PHP 5 the FILE_USE_INCLUDE_PATH can be used\nto trigger include path\nsearch.\n\u003c/p\u003e`\n- `resource|null $context [optional] \u003cp\u003e\nA valid context resource created with\nstream_context_create. If you don't need to use a\ncustom context, you can skip this parameter by \u0026null;.\n\u003c/p\u003e`\n- `int|null $offset [optional] \u003cp\u003e\nThe offset where the reading starts.\n\u003c/p\u003e`\n- `int\u003c0, max\u003e|null $max_length [optional] \u003cp\u003e\nMaximum length of data read. The default is to read until end\nof file is reached.\n\u003c/p\u003e`\n- `int $timeout \u003cp\u003eThe time in seconds for the timeout.\u003c/p\u003e`\n- `bool $convert_to_utf8 \u003cstrong\u003eWARNING!!!\u003c/strong\u003e \u003cp\u003eMaybe you can't use this option for\nsome files, because they used non default utf-8 chars. Binary files\nlike images or pdf will not be converted.\u003c/p\u003e`\n- `string $from_encoding [optional] \u003cp\u003ee.g. 'UTF-16', 'UTF-8', 'ISO-8859-1', etc.\u003cbr\u003e\nA empty string will trigger the autodetect anyway.\u003c/p\u003e`\n\n**Return:**\n- `false|string \u003cp\u003eThe function returns the read data as string or \u003cb\u003efalse\u003c/b\u003e on failure.\u003c/p\u003e`\n\n--------\n\n## file_has_bom(string $file_path): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nChecks if a file starts with BOM (Byte Order Mark) character.\n\nEXAMPLE: \u003ccode\u003eUTF8::file_has_bom('utf8_with_bom.txt'); // true\u003c/code\u003e\n\n**Parameters:**\n- `string $file_path \u003cp\u003ePath to a valid file.\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003e\u003cstrong\u003etrue\u003c/strong\u003e if the file has BOM at the start, \u003cstrong\u003efalse\u003c/strong\u003e otherwise\u003c/p\u003e`\n\n--------\n\n## filter(array|object|string $var, int $normalization_form, string $leading_combining): mixed\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nNormalizes to UTF-8 NFC, converting from WINDOWS-1252 when needed.\n\nEXAMPLE: \u003ccode\u003eUTF8::filter(array(\"\\xE9\", 'à', 'a')); // array('é', 'à', 'a')\u003c/code\u003e\n\n**Parameters:**\n- `TFilter $var`\n- `int $normalization_form`\n- `string $leading_combining`\n\n**Return:**\n- `mixed`\n\n--------\n\n## filter_input(int $type, string $variable_name, int $filter, int|int[]|null $options): mixed\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\n\"filter_input()\"-wrapper with normalizes to UTF-8 NFC, converting from WINDOWS-1252 when needed.\n\nGets a specific external variable by name and optionally filters it.\n\nEXAMPLE: \u003ccode\u003e\n// _GET['foo'] = 'bar';\nUTF8::filter_input(INPUT_GET, 'foo', FILTER_UNSAFE_RAW)); // 'bar'\n\u003c/code\u003e\n\n**Parameters:**\n- `int $type \u003cp\u003e\nOne of \u003cb\u003eINPUT_GET\u003c/b\u003e, \u003cb\u003eINPUT_POST\u003c/b\u003e,\n\u003cb\u003eINPUT_COOKIE\u003c/b\u003e, \u003cb\u003eINPUT_SERVER\u003c/b\u003e, or\n\u003cb\u003eINPUT_ENV\u003c/b\u003e.\n\u003c/p\u003e`\n- `string $variable_name \u003cp\u003e\nName of a variable to get.\n\u003c/p\u003e`\n- `int $filter [optional] \u003cp\u003e\nThe ID of the filter to apply. The\nmanual page lists the available filters.\n\u003c/p\u003e`\n- `int|int[]|null $options [optional] \u003cp\u003e\nAssociative array of options or bitwise disjunction of flags. If filter\naccepts options, flags can be provided in \"flags\" field of array.\n\u003c/p\u003e`\n\n**Return:**\n- `mixed \u003cp\u003e\nValue of the requested variable on success, \u003cb\u003eFALSE\u003c/b\u003e if the filter fails, or \u003cb\u003eNULL\u003c/b\u003e if the\n\u003ci\u003evariable_name\u003c/i\u003e variable is not set. If the flag \u003cb\u003eFILTER_NULL_ON_FAILURE\u003c/b\u003e is used, it\nreturns \u003cb\u003eFALSE\u003c/b\u003e if the variable is not set and \u003cb\u003eNULL\u003c/b\u003e if the filter fails.\n\u003c/p\u003e`\n\n--------\n\n## filter_input_array(int $type, array|null $definition, bool $add_empty): array\u003cstring,mixed\u003e|false|null\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\n\"filter_input_array()\"-wrapper with normalizes to UTF-8 NFC, converting from WINDOWS-1252 when needed.\n\nGets external variables and optionally filters them.\n\nEXAMPLE: \u003ccode\u003e\n// _GET['foo'] = 'bar';\nUTF8::filter_input_array(INPUT_GET, array('foo' =\u003e 'FILTER_UNSAFE_RAW')); // array('bar')\n\u003c/code\u003e\n\n**Parameters:**\n- `int $type \u003cp\u003e\nOne of \u003cb\u003eINPUT_GET\u003c/b\u003e, \u003cb\u003eINPUT_POST\u003c/b\u003e,\n\u003cb\u003eINPUT_COOKIE\u003c/b\u003e, \u003cb\u003eINPUT_SERVER\u003c/b\u003e, or\n\u003cb\u003eINPUT_ENV\u003c/b\u003e.\n\u003c/p\u003e`\n- `array\u003cstring, mixed\u003e|null $definition [optional] \u003cp\u003e\nAn array defining the arguments. A valid key is a string\ncontaining a variable name and a valid value is either a filter type, or an array\noptionally specifying the filter, flags and options. If the value is an\narray, valid keys are filter which specifies the\nfilter type,\nflags which specifies any flags that apply to the\nfilter, and options which specifies any options that\napply to the filter. See the example below for a better understanding.\n\u003c/p\u003e\n\u003cp\u003e\nThis parameter can be also an integer holding a filter constant. Then all values in the\ninput array are filtered by this filter.\n\u003c/p\u003e`\n- `bool $add_empty [optional] \u003cp\u003e\nAdd missing keys as \u003cb\u003eNULL\u003c/b\u003e to the return value.\n\u003c/p\u003e`\n\n**Return:**\n- `array\u003cstring,mixed\u003e|false|null \u003cp\u003e\nAn array containing the values of the requested variables on success, or \u003cb\u003eFALSE\u003c/b\u003e on failure.\nAn array value will be \u003cb\u003eFALSE\u003c/b\u003e if the filter fails, or \u003cb\u003eNULL\u003c/b\u003e if the variable is not\nset. Or if the flag \u003cb\u003eFILTER_NULL_ON_FAILURE\u003c/b\u003e is used, it returns \u003cb\u003eFALSE\u003c/b\u003e if the variable\nis not set and \u003cb\u003eNULL\u003c/b\u003e if the filter fails.\n\u003c/p\u003e`\n\n--------\n\n## filter_var(float|int|string|null $variable, int $filter, int|int[] $options): mixed\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\n\"filter_var()\"-wrapper with normalizes to UTF-8 NFC, converting from WINDOWS-1252 when needed.\n\nFilters a variable with a specified filter.\n\nEXAMPLE: \u003ccode\u003eUTF8::filter_var('-ABC-中文空白-', FILTER_VALIDATE_URL); // false\u003c/code\u003e\n\n**Parameters:**\n- `float|int|string|null $variable \u003cp\u003e\nValue to filter.\n\u003c/p\u003e`\n- `int $filter [optional] \u003cp\u003e\nThe ID of the filter to apply. The\nmanual page lists the available filters.\n\u003c/p\u003e`\n- `int|int[] $options [optional] \u003cp\u003e\nAssociative array of options or bitwise disjunction of flags. If filter\naccepts options, flags can be provided in \"flags\" field of array. For\nthe \"callback\" filter, callable type should be passed. The\ncallback must accept one argument, the value to be filtered, and return\nthe value after filtering/sanitizing it.\n\u003c/p\u003e\n\u003cp\u003e\n\u003ccode\u003e\n// for filters that accept options, use this format\n$options = array(\n'options' =\u003e array(\n'default' =\u003e 3, // value to return if the filter fails\n// other options here\n'min_range' =\u003e 0\n),\n'flags' =\u003e FILTER_FLAG_ALLOW_OCTAL,\n);\n$var = filter_var('0755', FILTER_VALIDATE_INT, $options);\n// for filter that only accept flags, you can pass them directly\n$var = filter_var('oops', FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);\n// for filter that only accept flags, you can also pass as an array\n$var = filter_var('oops', FILTER_VALIDATE_BOOLEAN,\narray('flags' =\u003e FILTER_NULL_ON_FAILURE));\n// callback validate filter\nfunction foo($value)\n{\n// Expected format: Surname, GivenNames\nif (strpos($value, \", \") === false) return false;\nlist($surname, $givennames) = explode(\", \", $value, 2);\n$empty = (empty($surname) || empty($givennames));\n$notstrings = (!is_string($surname) || !is_string($givennames));\nif ($empty || $notstrings) {\nreturn false;\n} else {\nreturn $value;\n}\n}\n$var = filter_var('Doe, Jane Sue', FILTER_CALLBACK, array('options' =\u003e 'foo'));\n\u003c/code\u003e\n\u003c/p\u003e`\n\n**Return:**\n- `mixed \u003cp\u003eThe filtered data, or \u003cb\u003eFALSE\u003c/b\u003e if the filter fails.\u003c/p\u003e`\n\n--------\n\n## filter_var_array(array $data, array|int $definition, bool $add_empty): array\u003cstring,mixed\u003e|false|null\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\n\"filter_var_array()\"-wrapper with normalizes to UTF-8 NFC, converting from WINDOWS-1252 when needed.\n\nGets multiple variables and optionally filters them.\n\nEXAMPLE: \u003ccode\u003e\n$filters = [\n    'name'  =\u003e ['filter'  =\u003e FILTER_CALLBACK, 'options' =\u003e [UTF8::class, 'ucwords']],\n    'age'   =\u003e ['filter'  =\u003e FILTER_VALIDATE_INT, 'options' =\u003e ['min_range' =\u003e 1, 'max_range' =\u003e 120]],\n    'email' =\u003e FILTER_VALIDATE_EMAIL,\n];\n\n$data = [\n    'name' =\u003e 'κόσμε',\n    'age' =\u003e '18',\n    'email' =\u003e 'foo@bar.de'\n];\n\nUTF8::filter_var_array($data, $filters, true); // ['name' =\u003e 'Κόσμε', 'age' =\u003e 18, 'email' =\u003e 'foo@bar.de']\n\u003c/code\u003e\n\n**Parameters:**\n- `array\u003cstring, mixed\u003e $data \u003cp\u003e\nAn array with string keys containing the data to filter.\n\u003c/p\u003e`\n- `array\u003cstring, mixed\u003e|int $definition [optional] \u003cp\u003e\nAn array defining the arguments. A valid key is a string\ncontaining a variable name and a valid value is either a\nfilter type, or an\narray optionally specifying the filter, flags and options.\nIf the value is an array, valid keys are filter\nwhich specifies the filter type,\nflags which specifies any flags that apply to the\nfilter, and options which specifies any options that\napply to the filter. See the example below for a better understanding.\n\u003c/p\u003e\n\u003cp\u003e\nThis parameter can be also an integer holding a filter constant. Then all values\nin the input array are filtered by this filter.\n\u003c/p\u003e`\n- `bool $add_empty [optional] \u003cp\u003e\nAdd missing keys as \u003cb\u003eNULL\u003c/b\u003e to the return value.\n\u003c/p\u003e`\n\n**Return:**\n- `array\u003cstring,mixed\u003e|false|null \u003cp\u003e\nAn array containing the values of the requested variables on success, or \u003cb\u003eFALSE\u003c/b\u003e on failure.\nAn array value will be \u003cb\u003eFALSE\u003c/b\u003e if the filter fails, or \u003cb\u003eNULL\u003c/b\u003e if the variable is not\nset.\n\u003c/p\u003e`\n\n--------\n\n## finfo_loaded(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nChecks whether finfo is available on the server.\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003e\u003cstrong\u003etrue\u003c/strong\u003e if available, \u003cstrong\u003efalse\u003c/strong\u003e otherwise\u003c/p\u003e`\n\n--------\n\n## first_char(string $str, int $n, string $encoding): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the first $n characters of the string.\n\n**Parameters:**\n- `T $str \u003cp\u003eThe input string.\u003c/p\u003e`\n- `int\u003c1, max\u003e $n \u003cp\u003eNumber of characters to retrieve from the start.\u003c/p\u003e`\n- `string $encoding [optional] \u003cp\u003eSet the charset for e.g. \"mb_\" function\u003c/p\u003e`\n\n**Return:**\n- `string`\n\n--------\n\n## fits_inside(string $str, int $box_size): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCheck if the number of Unicode characters isn't greater than the specified integer.\n\nEXAMPLE: \u003ccode\u003eUTF8::fits_inside('κόσμε', 6); // false\u003c/code\u003e\n\n**Parameters:**\n- `string $str the original string to be checked`\n- `int $box_size the size in number of chars to be checked against string`\n\n**Return:**\n- `bool \u003cp\u003e\u003cstrong\u003eTRUE\u003c/strong\u003e if string is less than or equal to $box_size, \u003cstrong\u003eFALSE\u003c/strong\u003e otherwise.\u003c/p\u003e`\n\n--------\n\n## fix_simple_utf8(string $str): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nTry to fix simple broken UTF-8 strings.\n\nINFO: Take a look at \"UTF8::fix_utf8()\" if you need a more advanced fix for broken UTF-8 strings.\n\nEXAMPLE: \u003ccode\u003eUTF8::fix_simple_utf8('DÃ¼sseldorf'); // 'Düsseldorf'\u003c/code\u003e\n\nIf you received an UTF-8 string that was converted from Windows-1252 as it was ISO-8859-1\n(ignoring Windows-1252 chars from 80 to 9F) use this function to fix it.\nSee: http://en.wikipedia.org/wiki/Windows-1252\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string\u003c/p\u003e`\n\n**Return:**\n- `string`\n\n--------\n\n## fix_utf8(string|string[] $str): string|string[]\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nFix a double (or multiple) encoded UTF8 string.\n\nEXAMPLE: \u003ccode\u003eUTF8::fix_utf8('FÃÂÂÂÂ©dÃÂÂÂÂ©ration'); // 'Fédération'\u003c/code\u003e\n\n**Parameters:**\n- `TFixUtf8 $str you can use a string or an array of strings`\n\n**Return:**\n- `string|string[] \u003cp\u003eWill return the fixed input-\"array\" or\nthe fixed input-\"string\".\u003c/p\u003e`\n\n--------\n\n## getCharDirection(string $char): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nGet character of a specific character.\n\nEXAMPLE: \u003ccode\u003eUTF8::getCharDirection('ا'); // 'RTL'\u003c/code\u003e\n\n**Parameters:**\n- `string $char`\n\n**Return:**\n- `string \u003cp\u003e'RTL' or 'LTR'.\u003c/p\u003e`\n\n--------\n\n## getSupportInfo(string|null $key): mixed\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCheck for php-support.\n\n**Parameters:**\n- `string|null $key`\n\n**Return:**\n- `mixed Return the full support-\"array\", if $key === null\u003cbr\u003e\nreturn bool-value, if $key is used and available\u003cbr\u003e\notherwise return \u003cstrong\u003enull\u003c/strong\u003e`\n\n--------\n\n## getUrlParamFromArray(string $param, array $data): mixed\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nGet data from an array via array like string.\n\nEXAMPLE: \u003ccode\u003e$array['foo'][123] = 'lall'; UTF8::getUrlParamFromArray('foo[123]', $array); // 'lall'\u003c/code\u003e\n\n**Parameters:**\n- `string $param`\n- `array\u003carray-key, mixed\u003e $data`\n\n**Return:**\n- `mixed`\n\n--------\n\n## get_file_type(string $str, array $fallback): \n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nWarning: this method only works for some file-types (png, jpg)\n         if you need more supported types, please use e.g. \"finfo\"\n\n**Parameters:**\n- `string $str`\n- `array{ext: (null|string), mime: (null|string), type: (null|string)} $fallback`\n\n**Return:**\n- `array{ext: (null|string), mime: (null|string), type: (null|string)}`\n\n--------\n\n## get_random_string(int $length, string $possible_chars, string $encoding): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\n\n\n**Parameters:**\n- `int\u003c1, max\u003e $length \u003cp\u003eLength of the random string.\u003c/p\u003e`\n- `T $possible_chars [optional] \u003cp\u003eCharacters string for the random selection.\u003c/p\u003e`\n- `string $encoding [optional] \u003cp\u003eSet the charset for e.g. \"mb_\" function\u003c/p\u003e`\n\n**Return:**\n- `string`\n\n--------\n\n## get_unique_string(int|string $extra_entropy, bool $use_md5): non-empty-string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\n\n\n**Parameters:**\n- `int|string $extra_entropy [optional] \u003cp\u003eExtra entropy via a string or int value.\u003c/p\u003e`\n- `bool $use_md5 [optional] \u003cp\u003eReturn the unique identifier as md5-hash? Default: true\u003c/p\u003e`\n\n**Return:**\n- `non-empty-string`\n\n--------\n\n## has_lowercase(string $str): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains a lower case char, false otherwise.\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not the string contains a lower case character.\u003c/p\u003e`\n\n--------\n\n## has_uppercase(string $str): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains an upper case char, false otherwise.\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not the string contains an upper case character.\u003c/p\u003e`\n\n--------\n\n## has_whitespace(string $str): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains whitespace, false otherwise.\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not the string contains whitespace.\u003c/p\u003e`\n\n--------\n\n## hex_to_chr(string $hexdec): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nConverts a hexadecimal value into a UTF-8 character.\n\nINFO: opposite to UTF8::chr_to_hex()\n\nEXAMPLE: \u003ccode\u003eUTF8::hex_to_chr('U+00a7'); // '§'\u003c/code\u003e\n\n**Parameters:**\n- `string $hexdec \u003cp\u003eThe hexadecimal value.\u003c/p\u003e`\n\n**Return:**\n- `string \u003cp\u003eOne single UTF-8 character.\u003c/p\u003e`\n\n--------\n\n## hex_to_int(string $hexdec): false|int\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nConverts hexadecimal U+xxxx code point representation to integer.\n\nINFO: opposite to UTF8::int_to_hex()\n\nEXAMPLE: \u003ccode\u003eUTF8::hex_to_int('U+00f1'); // 241\u003c/code\u003e\n\n**Parameters:**\n- `string $hexdec \u003cp\u003eThe hexadecimal code point representation.\u003c/p\u003e`\n\n**Return:**\n- `false|int \u003cp\u003eThe code point, or false on failure.\u003c/p\u003e`\n\n--------\n\n## html_encode(string $str, bool $keep_ascii_chars, string $encoding): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nConverts a UTF-8 string to a series of HTML numbered entities.\n\nINFO: opposite to UTF8::html_decode()\n\nEXAMPLE: \u003ccode\u003eUTF8::html_encode('中文空白'); // '\u0026#20013;\u0026#25991;\u0026#31354;\u0026#30333;'\u003c/code\u003e\n\n**Parameters:**\n- `T $str \u003cp\u003eThe Unicode string to be encoded as numbered entities.\u003c/p\u003e`\n- `bool $keep_ascii_chars [optional] \u003cp\u003eKeep ASCII chars.\u003c/p\u003e`\n- `string $encoding [optional] \u003cp\u003eSet the charset for e.g. \"mb_\" function\u003c/p\u003e`\n\n**Return:**\n- `string \u003cp\u003eHTML numbered entities.\u003c/p\u003e`\n\n--------\n\n## html_entity_decode(string $str, int|null $flags, string $encoding): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nUTF-8 version of html_entity_decode()\n\nThe reason we are not using html_entity_decode() by itself is because\nwhile it is not technically correct to leave out the semicolon\nat the end of an entity most browsers will still interpret the entity\ncorrectly. html_entity_decode() does not convert entities without\nsemicolons, so we are left with our own little solution here. Bummer.\n\nConvert all HTML entities to their applicable characters.\n\nINFO: opposite to UTF8::html_encode()\n\nEXAMPLE: \u003ccode\u003eUTF8::html_entity_decode('\u0026#20013;\u0026#25991;\u0026#31354;\u0026#30333;'); // '中文空白'\u003c/code\u003e\n\n**Parameters:**\n- `T $str \u003cp\u003e\nThe input string.\n\u003c/p\u003e`\n- `int|null $flags [optional] \u003cp\u003e\nA bitmask of one or more of the following flags, which specify how to handle quotes\nand which document type to use. The default is ENT_COMPAT | ENT_HTML401.\n\u003ctable\u003e\nAvailable \u003ci\u003eflags\u003c/i\u003e constants\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003eConstant Name\u003c/td\u003e\n\u003ctd\u003eDescription\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_COMPAT\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003eWill convert double-quotes and leave single-quotes alone.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_QUOTES\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003eWill convert both double and single quotes.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_NOQUOTES\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003eWill leave both double and single quotes unconverted.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_HTML401\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nHandle code as HTML 4.01.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_XML1\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nHandle code as XML 1.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_XHTML\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nHandle code as XHTML.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_HTML5\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nHandle code as HTML 5.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\u003c/p\u003e`\n- `string $encoding [optional] \u003cp\u003eSet the charset for e.g. \"mb_\" function\u003c/p\u003e`\n\n**Return:**\n- `string \u003cp\u003eThe decoded string.\u003c/p\u003e`\n\n--------\n\n## html_escape(string $str, string $encoding): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCreate a escape html version of the string via \"UTF8::htmlspecialchars()\".\n\n**Parameters:**\n- `string $str`\n- `string $encoding [optional] \u003cp\u003eSet the charset for e.g. \"mb_\" function\u003c/p\u003e`\n\n**Return:**\n- `string`\n\n--------\n\n## html_stripe_empty_tags(string $str): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nRemove empty html-tag.\n\ne.g.: \u003cpre\u003e\u003ctag\u003e\u003c/tag\u003e\u003c/pre\u003e\n\n**Parameters:**\n- `string $str`\n\n**Return:**\n- `string`\n\n--------\n\n## htmlentities(string $str, int $flags, string $encoding, bool $double_encode): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nConvert all applicable characters to HTML entities: UTF-8 version of htmlentities().\n\nEXAMPLE: \u003ccode\u003eUTF8::htmlentities('\u003c白-öäü\u003e'); // '\u0026lt;\u0026#30333;-\u0026ouml;\u0026auml;\u0026uuml;\u0026gt;'\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003e\nThe input string.\n\u003c/p\u003e`\n- `int $flags [optional] \u003cp\u003e\nA bitmask of one or more of the following flags, which specify how to handle\nquotes, invalid code unit sequences and the used document type. The default is\nENT_COMPAT | ENT_HTML401.\n\u003ctable\u003e\nAvailable \u003ci\u003eflags\u003c/i\u003e constants\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003eConstant Name\u003c/td\u003e\n\u003ctd\u003eDescription\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_COMPAT\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003eWill convert double-quotes and leave single-quotes alone.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_QUOTES\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003eWill convert both double and single quotes.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_NOQUOTES\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003eWill leave both double and single quotes unconverted.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_IGNORE\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nSilently discard invalid code unit sequences instead of returning\nan empty string. Using this flag is discouraged as it\nmay have security implications.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_SUBSTITUTE\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nReplace invalid code unit sequences with a Unicode Replacement Character\nU+FFFD (UTF-8) or \u0026#38;#38;#FFFD; (otherwise) instead of returning an empty\nstring.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_DISALLOWED\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nReplace invalid code points for the given document type with a\nUnicode Replacement Character U+FFFD (UTF-8) or \u0026#38;#38;#FFFD;\n(otherwise) instead of leaving them as is. This may be useful, for\ninstance, to ensure the well-formedness of XML documents with\nembedded external content.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_HTML401\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nHandle code as HTML 4.01.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_XML1\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nHandle code as XML 1.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_XHTML\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nHandle code as XHTML.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_HTML5\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nHandle code as HTML 5.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\u003c/p\u003e`\n- `string $encoding [optional] \u003cp\u003e\nLike \u003cb\u003ehtmlspecialchars\u003c/b\u003e,\n\u003cb\u003ehtmlentities\u003c/b\u003e takes an optional third argument\n\u003ci\u003eencoding\u003c/i\u003e which defines encoding used in\nconversion.\nAlthough this argument is technically optional, you are highly\nencouraged to specify the correct value for your code.\n\u003c/p\u003e`\n- `bool $double_encode [optional] \u003cp\u003e\nWhen \u003ci\u003edouble_encode\u003c/i\u003e is turned off PHP will not\nencode existing html entities. The default is to convert everything.\n\u003c/p\u003e`\n\n**Return:**\n- `string \u003cp\u003e\nThe encoded string.\n\u003cbr\u003e\u003cbr\u003e\nIf the input \u003ci\u003estring\u003c/i\u003e contains an invalid code unit\nsequence within the given \u003ci\u003eencoding\u003c/i\u003e an empty string\nwill be returned, unless either the \u003cb\u003eENT_IGNORE\u003c/b\u003e or\n\u003cb\u003eENT_SUBSTITUTE\u003c/b\u003e flags are set.\n\u003c/p\u003e`\n\n--------\n\n## htmlspecialchars(string $str, int $flags, string $encoding, bool $double_encode): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nConvert only special characters to HTML entities: UTF-8 version of htmlspecialchars()\n\nINFO: Take a look at \"UTF8::htmlentities()\"\n\nEXAMPLE: \u003ccode\u003eUTF8::htmlspecialchars('\u003c白-öäü\u003e'); // '\u0026lt;白-öäü\u0026gt;'\u003c/code\u003e\n\n**Parameters:**\n- `T $str \u003cp\u003e\nThe string being converted.\n\u003c/p\u003e`\n- `int $flags [optional] \u003cp\u003e\nA bitmask of one or more of the following flags, which specify how to handle\nquotes, invalid code unit sequences and the used document type. The default is\nENT_COMPAT | ENT_HTML401.\n\u003ctable\u003e\nAvailable \u003ci\u003eflags\u003c/i\u003e constants\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003eConstant Name\u003c/td\u003e\n\u003ctd\u003eDescription\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_COMPAT\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003eWill convert double-quotes and leave single-quotes alone.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_QUOTES\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003eWill convert both double and single quotes.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_NOQUOTES\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003eWill leave both double and single quotes unconverted.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_IGNORE\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nSilently discard invalid code unit sequences instead of returning\nan empty string. Using this flag is discouraged as it\nmay have security implications.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_SUBSTITUTE\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nReplace invalid code unit sequences with a Unicode Replacement Character\nU+FFFD (UTF-8) or \u0026#38;#38;#FFFD; (otherwise) instead of returning an empty\nstring.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_DISALLOWED\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nReplace invalid code points for the given document type with a\nUnicode Replacement Character U+FFFD (UTF-8) or \u0026#38;#38;#FFFD;\n(otherwise) instead of leaving them as is. This may be useful, for\ninstance, to ensure the well-formedness of XML documents with\nembedded external content.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_HTML401\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nHandle code as HTML 4.01.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_XML1\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nHandle code as XML 1.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_XHTML\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nHandle code as XHTML.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_HTML5\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nHandle code as HTML 5.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\u003c/p\u003e`\n- `string $encoding [optional] \u003cp\u003e\nDefines encoding used in conversion.\n\u003c/p\u003e\n\u003cp\u003e\nFor the purposes of this function, the encodings\nISO-8859-1, ISO-8859-15,\nUTF-8, cp866,\ncp1251, cp1252, and\nKOI8-R are effectively equivalent, provided the\n\u003ci\u003estring\u003c/i\u003e itself is valid for the encoding, as\nthe characters affected by \u003cb\u003ehtmlspecialchars\u003c/b\u003e occupy\nthe same positions in all of these encodings.\n\u003c/p\u003e`\n- `bool $double_encode [optional] \u003cp\u003e\nWhen \u003ci\u003edouble_encode\u003c/i\u003e is turned off PHP will not\nencode existing html entities, the default is to convert everything.\n\u003c/p\u003e`\n\n**Return:**\n- `string \u003cp\u003eThe converted string.\u003c/p\u003e\n\u003cp\u003e\nIf the input \u003ci\u003estring\u003c/i\u003e contains an invalid code unit\nsequence within the given \u003ci\u003eencoding\u003c/i\u003e an empty string\nwill be returned, unless either the \u003cb\u003eENT_IGNORE\u003c/b\u003e or\n\u003cb\u003eENT_SUBSTITUTE\u003c/b\u003e flags are set.\u003c/p\u003e`\n\n--------\n\n## iconv_loaded(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nChecks whether iconv is available on the server.\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003e\u003cstrong\u003etrue\u003c/strong\u003e if available, \u003cstrong\u003efalse\u003c/strong\u003e otherwise\u003c/p\u003e`\n\n--------\n\n## int_to_hex(int $int, string $prefix): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nConverts Integer to hexadecimal U+xxxx code point representation.\n\nINFO: opposite to UTF8::hex_to_int()\n\nEXAMPLE: \u003ccode\u003eUTF8::int_to_hex(241); // 'U+00f1'\u003c/code\u003e\n\n**Parameters:**\n- `int $int \u003cp\u003eThe integer to be converted to hexadecimal code point.\u003c/p\u003e`\n- `string $prefix [optional]`\n\n**Return:**\n- `string the code point, or empty string on failure`\n\n--------\n\n## intlChar_loaded(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nChecks whether intl-char is available on the server.\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003e\u003cstrong\u003etrue\u003c/strong\u003e if available, \u003cstrong\u003efalse\u003c/strong\u003e otherwise\u003c/p\u003e`\n\n--------\n\n## intl_loaded(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nChecks whether intl is available on the server.\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003e\u003cstrong\u003etrue\u003c/strong\u003e if available, \u003cstrong\u003efalse\u003c/strong\u003e otherwise\u003c/p\u003e`\n\n--------\n\n## is_alpha(string $str): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains only alphabetic chars, false otherwise.\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str contains only alphabetic chars.\u003c/p\u003e`\n\n--------\n\n## is_alphanumeric(string $str): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains only alphabetic and numeric chars, false otherwise.\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str contains only alphanumeric chars.\u003c/p\u003e`\n\n--------\n\n## is_ascii(string $str): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nChecks if a string is 7 bit ASCII.\n\nEXAMPLE: \u003ccode\u003eUTF8::is_ascii('白'); // false\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003eThe string to check.\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003e\n\u003cstrong\u003etrue\u003c/strong\u003e if it is ASCII\u003cbr\u003e\n\u003cstrong\u003efalse\u003c/strong\u003e otherwise\n\u003c/p\u003e`\n\n--------\n\n## is_base64(string|null $str, bool $empty_string_is_valid): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string is base64 encoded, false otherwise.\n\nEXAMPLE: \u003ccode\u003eUTF8::is_base64('4KSu4KWL4KSo4KS/4KSa'); // true\u003c/code\u003e\n\n**Parameters:**\n- `string|null $str \u003cp\u003eThe input string.\u003c/p\u003e`\n- `bool $empty_string_is_valid [optional] \u003cp\u003eIs an empty string valid base64 or not?\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str is base64 encoded.\u003c/p\u003e`\n\n--------\n\n## is_binary(int|string $input, bool $strict): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCheck if the input is binary... (is look like a hack).\n\nEXAMPLE: \u003ccode\u003eUTF8::is_binary(01); // true\u003c/code\u003e\n\n**Parameters:**\n- `int|string $input`\n- `bool $strict`\n\n**Return:**\n- `bool`\n\n--------\n\n## is_binary_file(string $file): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCheck if the file is binary.\n\nEXAMPLE: \u003ccode\u003eUTF8::is_binary('./utf32.txt'); // true\u003c/code\u003e\n\n**Parameters:**\n- `string $file`\n\n**Return:**\n- `bool`\n\n--------\n\n## is_blank(string $str): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains only whitespace chars, false otherwise.\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str contains only whitespace characters.\u003c/p\u003e`\n\n--------\n\n## is_bom(string $str): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nChecks if the given string is equal to any \"Byte Order Mark\".\n\nWARNING: Use \"UTF8::string_has_bom()\" if you will check BOM in a string.\n\nEXAMPLE: \u003ccode\u003eUTF8::is_bom(\"\\xef\\xbb\\xbf\"); // true\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003e\u003cstrong\u003etrue\u003c/strong\u003e if the $utf8_chr is Byte Order Mark, \u003cstrong\u003efalse\u003c/strong\u003e otherwise.\u003c/p\u003e`\n\n--------\n\n## is_empty(array|float|int|string $str): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nDetermine whether the string is considered to be empty.\n\nA variable is considered empty if it does not exist or if its value equals FALSE.\nempty() does not generate a warning if the variable does not exist.\n\n**Parameters:**\n- `array\u003carray-key, mixed\u003e|float|int|string $str`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str is empty().\u003c/p\u003e`\n\n--------\n\n## is_hexadecimal(string $str): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains only hexadecimal chars, false otherwise.\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str contains only hexadecimal chars.\u003c/p\u003e`\n\n--------\n\n## is_html(string $str): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCheck if the string contains any HTML tags.\n\nEXAMPLE: \u003ccode\u003eUTF8::is_html('\u003cb\u003elall\u003c/b\u003e'); // true\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str contains html elements.\u003c/p\u003e`\n\n--------\n\n## is_json(string $str, bool $only_array_or_object_results_are_valid): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nTry to check if \"$str\" is a JSON-string.\n\nEXAMPLE: \u003ccode\u003eUTF8::is_json('{\"array\":[1,\"¥\",\"ä\"]}'); // true\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n- `bool $only_array_or_object_results_are_valid [optional] \u003cp\u003eOnly array and objects are valid json\nresults.\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not the $str is in JSON format.\u003c/p\u003e`\n\n--------\n\n## is_lowercase(string $str): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\n\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str contains only lowercase chars.\u003c/p\u003e`\n\n--------\n\n## is_printable(string $str, bool $ignore_control_characters): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains only printable (non-invisible) chars, false otherwise.\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n- `bool $ignore_control_characters [optional] \u003cp\u003eIgnore control characters like [LRM] or [LSEP].\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str contains only printable (non-invisible) chars.\u003c/p\u003e`\n\n--------\n\n## is_punctuation(string $str): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains only punctuation chars, false otherwise.\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str contains only punctuation chars.\u003c/p\u003e`\n\n--------\n\n## is_serialized(string $str): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string is serialized, false otherwise.\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str is serialized.\u003c/p\u003e`\n\n--------\n\n## is_uppercase(string $str): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains only lower case chars, false\notherwise.\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str contains only lower case characters.\u003c/p\u003e`\n\n--------\n\n## is_url(string $url, bool $disallow_localhost): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCheck if $url is an correct url.\n\n**Parameters:**\n- `string $url`\n- `bool $disallow_localhost`\n\n**Return:**\n- `bool`\n\n--------\n\n## is_utf8(int|string|string[]|null $str, bool $strict): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nChecks whether the passed input contains only byte sequences that appear valid UTF-8.\n\nEXAMPLE: \u003ccode\u003e\nUTF8::is_utf8(['Iñtërnâtiônàlizætiøn', 'foo']); // true\n//\nUTF8::is_utf8([\"Iñtërnâtiônàlizætiøn\\xA0\\xA1\", 'bar']); // false\n\u003c/code\u003e\n\n**Parameters:**\n- `int|string|string[]|null $str \u003cp\u003eThe input to be checked.\u003c/p\u003e`\n- `bool $strict \u003cp\u003eCheck also if the string is not UTF-16 or UTF-32.\u003c/p\u003e`\n\n**Return:**\n- `bool`\n\n--------\n\n## is_utf16(string $str, bool $check_if_string_is_binary): false|int\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCheck if the string is UTF-16.\n\nEXAMPLE: \u003ccode\u003e\nUTF8::is_utf16(file_get_contents('utf-16-le.txt')); // 1\n//\nUTF8::is_utf16(file_get_contents('utf-16-be.txt')); // 2\n//\nUTF8::is_utf16(file_get_contents('utf-8.txt')); // false\n\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n- `bool $check_if_string_is_binary`\n\n**Return:**\n- `false|int \u003cstrong\u003efalse\u003c/strong\u003e if is't not UTF-16,\u003cbr\u003e\n\u003cstrong\u003e1\u003c/strong\u003e for UTF-16LE,\u003cbr\u003e\n\u003cstrong\u003e2\u003c/strong\u003e for UTF-16BE`\n\n--------\n\n## is_utf32(string $str, bool $check_if_string_is_binary): false|int\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCheck if the string is UTF-32.\n\nEXAMPLE: \u003ccode\u003e\nUTF8::is_utf32(file_get_contents('utf-32-le.txt')); // 1\n//\nUTF8::is_utf32(file_get_contents('utf-32-be.txt')); // 2\n//\nUTF8::is_utf32(file_get_contents('utf-8.txt')); // false\n\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n- `bool $check_if_string_is_binary`\n\n**Return:**\n- `false|int \u003cstrong\u003efalse\u003c/strong\u003e if is't not UTF-32,\u003cbr\u003e\n\u003cstrong\u003e1\u003c/strong\u003e for UTF-32LE,\u003cbr\u003e\n\u003cstrong\u003e2\u003c/strong\u003e for UTF-32BE`\n\n--------\n\n## json_decode(string $json, bool $assoc, int $depth, int $options): mixed\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\n(PHP 5 \u0026gt;= 5.2.0, PECL json \u0026gt;= 1.2.0)\u003cbr/\u003e\nDecodes a JSON string\n\nEXAMPLE: \u003ccode\u003eUTF8::json_decode('[1,\"\\u00a5\",\"\\u00e4\"]'); // array(1, '¥', 'ä')\u003c/code\u003e\n\n**Parameters:**\n- `string $json \u003cp\u003e\nThe \u003ci\u003ejson\u003c/i\u003e string being decoded.\n\u003c/p\u003e\n\u003cp\u003e\nThis function only works with UTF-8 encoded strings.\n\u003c/p\u003e\n\u003cp\u003ePHP implements a superset of\nJSON - it will also encode and decode scalar types and \u003cb\u003eNULL\u003c/b\u003e. The JSON standard\nonly supports these values when they are nested inside an array or an object.\n\u003c/p\u003e`\n- `bool $assoc [optional] \u003cp\u003e\nWhen \u003cb\u003eTRUE\u003c/b\u003e, returned objects will be converted into\nassociative arrays.\n\u003c/p\u003e`\n- `int $depth [optional] \u003cp\u003e\nUser specified recursion depth.\n\u003c/p\u003e`\n- `int $options [optional] \u003cp\u003e\nBitmask of JSON decode options. Currently only\n\u003cb\u003eJSON_BIGINT_AS_STRING\u003c/b\u003e\nis supported (default is to cast large integers as floats)\n\u003c/p\u003e`\n\n**Return:**\n- `mixed \u003cp\u003eThe value encoded in \u003ci\u003ejson\u003c/i\u003e in appropriate PHP type. Values true, false and\nnull (case-insensitive) are returned as \u003cb\u003eTRUE\u003c/b\u003e, \u003cb\u003eFALSE\u003c/b\u003e and \u003cb\u003eNULL\u003c/b\u003e respectively.\n\u003cb\u003eNULL\u003c/b\u003e is returned if the \u003ci\u003ejson\u003c/i\u003e cannot be decoded or if the encoded data\nis deeper than the recursion limit.\u003c/p\u003e`\n\n--------\n\n## json_encode(mixed $value, int $options, int $depth): false|string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\n(PHP 5 \u0026gt;= 5.2.0, PECL json \u0026gt;= 1.2.0)\u003cbr/\u003e\nReturns the JSON representation of a value.\n\nEXAMPLE: \u003ccode\u003eUTF8::json_encode(array(1, '¥', 'ä')); // '[1,\"\\u00a5\",\"\\u00e4\"]'\u003c/code\u003e\n\n**Parameters:**\n- `mixed $value \u003cp\u003e\nThe \u003ci\u003evalue\u003c/i\u003e being encoded. Can be any type except\na resource.\n\u003c/p\u003e\n\u003cp\u003e\nAll string data must be UTF-8 encoded.\n\u003c/p\u003e\n\u003cp\u003ePHP implements a superset of\nJSON - it will also encode and decode scalar types and \u003cb\u003eNULL\u003c/b\u003e. The JSON standard\nonly supports these values when they are nested inside an array or an object.\n\u003c/p\u003e`\n- `int $options [optional] \u003cp\u003e\nBitmask consisting of \u003cb\u003eJSON_HEX_QUOT\u003c/b\u003e,\n\u003cb\u003eJSON_HEX_TAG\u003c/b\u003e,\n\u003cb\u003eJSON_HEX_AMP\u003c/b\u003e,\n\u003cb\u003eJSON_HEX_APOS\u003c/b\u003e,\n\u003cb\u003eJSON_NUMERIC_CHECK\u003c/b\u003e,\n\u003cb\u003eJSON_PRETTY_PRINT\u003c/b\u003e,\n\u003cb\u003eJSON_UNESCAPED_SLASHES\u003c/b\u003e,\n\u003cb\u003eJSON_FORCE_OBJECT\u003c/b\u003e,\n\u003cb\u003eJSON_UNESCAPED_UNICODE\u003c/b\u003e. The behaviour of these\nconstants is described on\nthe JSON constants page.\n\u003c/p\u003e`\n- `int $depth [optional] \u003cp\u003e\nSet the maximum depth. Must be greater than zero.\n\u003c/p\u003e`\n\n**Return:**\n- `false|string \u003cp\u003eA JSON encoded \u003cstrong\u003estring\u003c/strong\u003e on success or\u003cbr\u003e\n\u003cstrong\u003eFALSE\u003c/strong\u003e on failure.\u003c/p\u003e`\n\n--------\n\n## json_loaded(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nChecks whether JSON is available on the server.\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003e\u003cstrong\u003etrue\u003c/strong\u003e if available, \u003cstrong\u003efalse\u003c/strong\u003e otherwise\u003c/p\u003e`\n\n--------\n\n## lcfirst(string $str, string $encoding, bool $clean_utf8, string|null $lang, bool $try_to_keep_the_string_length): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nMakes string's first char lowercase.\n\nEXAMPLE: \u003ccode\u003eUTF8::lcfirst('ÑTËRNÂTIÔNÀLIZÆTIØN'); // ñTËRNÂTIÔNÀLIZÆTIØN\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string\u003c/p\u003e`\n- `string $encoding [optional] \u003cp\u003eSet the charset for e.g. \"mb_\" function\u003c/p\u003e`\n- `bool $clean_utf8 [optional] \u003cp\u003eRemove non UTF-8 chars from the string.\u003c/p\u003e`\n- `string|null $lang [optional] \u003cp\u003eSet the language for special cases: az, el, lt,\ntr\u003c/p\u003e`\n- `bool $try_to_keep_the_string_length [optional] \u003cp\u003etrue === try to keep the string length: e.g. ẞ\n-\u003e ß\u003c/p\u003e`\n\n**Return:**\n- `string \u003cp\u003eThe resulting string.\u003c/p\u003e`\n\n--------\n\n## lcwords(string $str, string[] $exceptions, string $char_list, string $encoding, bool $clean_utf8, string|null $lang, bool $try_to_keep_the_string_length): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nLowercase for all words in the string.\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n- `string[] $exceptions [optional] \u003cp\u003eExclusion for some words.\u003c/p\u003e`\n- `string $char_list [optional] \u003cp\u003eAdditional chars that contains to words and do\nnot start a new word.\u003c/p\u003e`\n- `string $encoding [optional] \u003cp\u003eSet the charset.\u003c/p\u003e`\n- `bool $clean_utf8 [optional] \u003cp\u003eRemove non UTF-8 chars from the string.\u003c/p\u003e`\n- `string|null $lang [optional] \u003cp\u003eSet the language for special cases: az, el, lt,\ntr\u003c/p\u003e`\n- `bool $try_to_keep_the_string_length [optional] \u003cp\u003etrue === try to keep the string length: e.g. ẞ\n-\u003e ß\u003c/p\u003e`\n\n**Return:**\n- `string`\n\n--------\n\n## levenshtein(string $str1, string $str2, int $insertionCost, int $replacementCost, int $deletionCost): int\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCalculate Levenshtein distance between two strings.\n\nFor better performance, in a real application with a single input string\nmatched against many strings from a database, you will probably want to pre-\nencode the input only once and use \\levenshtein().\n\nSource: https://github.com/KEINOS/mb_levenshtein\n\n**Parameters:**\n- `string $str1 \u003cp\u003eOne of the strings being evaluated for Levenshtein distance.\u003c/p\u003e`\n- `string $str2 \u003cp\u003eOne of the strings being evaluated for Levenshtein distance.\u003c/p\u003e`\n- `int $insertionCost [optional] \u003cp\u003eDefines the cost of insertion.\u003c/p\u003e`\n- `int $replacementCost [optional] \u003cp\u003eDefines the cost of replacement.\u003c/p\u003e`\n- `int $deletionCost [optional] \u003cp\u003eDefines the cost of deletion.\u003c/p\u003e`\n\n**Return:**\n- `int`\n\n--------\n\n## ltrim(string $str, string|null $chars): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nStrip whitespace or other characters from the beginning of a UTF-8 string.\n\nEXAMPLE: \u003ccode\u003eUTF8::ltrim('　中文空白　 '); // '中文空白　 '\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003eThe string to be trimmed\u003c/p\u003e`\n- `string|null $chars \u003cp\u003eOptional characters to be stripped\u003c/p\u003e`\n\n**Return:**\n- `string the string with unwanted characters stripped from the left`\n\n--------\n\n## max(string|string[] $arg): string|null\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the UTF-8 character with the maximum code point in the given data.\n\nEXAMPLE: \u003ccode\u003eUTF8::max('abc-äöü-中文空白'); // 'ø'\u003c/code\u003e\n\n**Parameters:**\n- `string|string[] $arg \u003cp\u003eA UTF-8 encoded string or an array of such strings.\u003c/p\u003e`\n\n**Return:**\n- `string|null the character with the highest code point than others, returns null on failure or empty input`\n\n--------\n\n## max_chr_width(string $str): int\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCalculates and returns the maximum number of bytes taken by any\nUTF-8 encoded character in the given string.\n\nEXAMPLE: \u003ccode\u003eUTF8::max_chr_width('Intërnâtiônàlizætiøn'); // 2\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003eThe original Unicode string.\u003c/p\u003e`\n\n**Return:**\n- `int \u003cp\u003eMax byte lengths of the given chars.\u003c/p\u003e`\n\n--------\n\n## mbstring_loaded(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nChecks whether mbstring is available on the server.\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003e\u003cstrong\u003etrue\u003c/strong\u003e if available, \u003cstrong\u003efalse\u003c/strong\u003e otherwise\u003c/p\u003e`\n\n--------\n\n## min(string|string[] $arg): string|null\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the UTF-8 character with the minimum code point in the given data.\n\nEXAMPLE: \u003ccode\u003eUTF8::min('abc-äöü-中文空白'); // '-'\u003c/code\u003e\n\n**Parameters:**\n- `string|string[] $arg \u003cstrong\u003eA UTF-8 encoded string or an array of such strings.\u003c/strong\u003e`\n\n**Return:**\n- `string|null \u003cp\u003eThe character with the lowest code point than others, returns null on failure or empty input.\u003c/p\u003e`\n\n--------\n\n## normalize_encoding(mixed $encoding, mixed $fallback): mixed|string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nNormalize the encoding-\"name\" input.\n\nEXAMPLE: \u003ccode\u003eUTF8::normalize_encoding('UTF8'); // 'UTF-8'\u003c/code\u003e\n\n**Parameters:**\n- `mixed $encoding \u003cp\u003ee.g.: ISO, UTF8, WINDOWS-1251 etc.\u003c/p\u003e`\n- `string|TNormalizeEncodingFallback $fallback \u003cp\u003ee.g.: UTF-8\u003c/p\u003e`\n\n**Return:**\n- `mixed|string \u003cp\u003ee.g.: ISO-8859-1, UTF-8, WINDOWS-1251 etc.\u003cbr\u003eWill return a empty string as fallback (by default)\u003c/p\u003e`\n\n--------\n\n## normalize_line_ending(string $str, string|string[] $replacer): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nStandardize line ending to unix-like.\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n- `string|string[] $replacer \u003cp\u003eThe replacer char e.g. \"\\n\" (Linux) or \"\\r\\n\" (Windows). You can also use \\PHP_EOL\nhere.\u003c/p\u003e`\n\n**Return:**\n- `string \u003cp\u003eA string with normalized line ending.\u003c/p\u003e`\n\n--------\n\n## normalize_msword(string $str): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nNormalize some MS Word special characters.\n\nEXAMPLE: \u003ccode\u003eUTF8::normalize_msword('„Abcdef…”'); // '\"Abcdef...\"'\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003eThe string to be normalized.\u003c/p\u003e`\n\n**Return:**\n- `string \u003cp\u003eA string with normalized characters for commonly used chars in Word documents.\u003c/p\u003e`\n\n--------\n\n## normalize_whitespace(string $str, bool $keep_non_breaking_space, bool $keep_bidi_unicode_controls, bool $normalize_control_characters): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nNormalize the whitespace.\n\nEXAMPLE: \u003ccode\u003eUTF8::normalize_whitespace(\"abc-\\xc2\\xa0-öäü-\\xe2\\x80\\xaf-\\xE2\\x80\\xAC\", true); // \"abc-\\xc2\\xa0-öäü- -\"\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003eThe string to be normalized.\u003c/p\u003e`\n- `bool $keep_non_breaking_space [optional] \u003cp\u003eSet to true, to keep non-breaking-spaces.\u003c/p\u003e`\n- `bool $keep_bidi_unicode_controls [optional] \u003cp\u003eSet to true, to keep non-printable (for the web)\nbidirectional text chars.\u003c/p\u003e`\n- `bool $normalize_control_characters [optional] \u003cp\u003eSet to true, to convert e.g. LINE-, PARAGRAPH-SEPARATOR with \"\\n\" and LINE TABULATION with \"\\t\".\u003c/p\u003e`\n\n**Return:**\n- `string \u003cp\u003eA string with normalized whitespace.\u003c/p\u003e`\n\n--------\n\n## ord(string $chr, string $encoding): int\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCalculates Unicode code point of the given UTF-8 encoded character.\n\nINFO: opposite to UTF8::chr()\n\nEXAMPLE: \u003ccode\u003eUTF8::ord('☃'); // 0x2603\u003c/code\u003e\n\n**Parameters:**\n- `string $chr \u003cp\u003eThe character of which to calculate code point.\u003cp/\u003e`\n- `string $encoding [optional] \u003cp\u003eSet the charset for e.g. \"mb_\" function\u003c/p\u003e`\n\n**Return:**\n- `int \u003cp\u003eUnicode code point of the given character,\u003cbr\u003e\n0 on invalid UTF-8 byte sequence\u003c/p\u003e`\n\n--------\n\n## parse_str(string $str, array $result, bool $clean_utf8): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nParses the string into an array (into the the second parameter).\n\nWARNING: Unlike \"parse_str()\", this method does not (re-)place variables in the current scope,\n         if the second parameter is not set!\n\nEXAMPLE: \u003ccode\u003e\nUTF8::parse_str('Iñtërnâtiônéàlizætiøn=測試\u0026arr[]=foo+測試\u0026arr[]=ການທົດສອບ', $array);\necho $array['Iñtërnâtiônéàlizætiøn']; // '測試'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n- `array\u003cstring, mixed\u003e $result \u003cp\u003eThe result will be returned into this reference parameter.\u003c/p\u003e`\n- `bool $clean_utf8 [optional] \u003cp\u003eRemove non UTF-8 chars from the string.\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWill return \u003cstrong\u003efalse\u003c/strong\u003e if php can't parse the string and we haven't any $result.\u003c/p\u003e`\n\n--------\n\n## pcre_utf8_support(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nChecks if \\u modifier is available that enables Unicode support in PCRE.\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003e\n\u003cstrong\u003etrue\u003c/strong\u003e if support is available,\u003cbr\u003e\n\u003cstrong\u003efalse\u003c/strong\u003e otherwise\n\u003c/p\u003e`\n\n--------\n\n## range(int|string $var1, int|string $var2, bool $use_ctype, string $encoding, float|int $step): list\u003cstring\u003e\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCreate an array containing a range of UTF-8 characters.\n\nEXAMPLE: \u003ccode\u003eUTF8::range('κ', 'ζ'); // array('κ', 'ι', 'θ', 'η', 'ζ',)\u003c/code\u003e\n\n**Parameters:**\n- `int|string $var1 \u003cp\u003eNumeric or hexadecimal code points, or a UTF-8 character to start from.\u003c/p\u003e`\n- `int|string $var2 \u003cp\u003eNumeric or hexadecimal code points, or a UTF-8 character to end at.\u003c/p\u003e`\n- `bool $use_ctype \u003cp\u003euse ctype to detect numeric and hexadecimal, otherwise we will use a simple\n\"is_numeric\"\u003c/p\u003e`\n- `string $encoding [optional] \u003cp\u003eSet the charset for e.g. \"mb_\" function\u003c/p\u003e`\n- `float|int $step [optional] \u003cp\u003e\nIf a step value is given, it will be used as the\nincrement between elements in the sequence. step\nshould be given as a positive number. If not specified,\nstep will default to 1.\n\u003c/p\u003e`\n\n**Return:**\n- `list\u003cstring\u003e`\n\n--------\n\n## rawurldecode(string $str, bool $multi_decode): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nMulti decode HTML entity + fix urlencoded-win1252-chars.\n\nEXAMPLE: \u003ccode\u003eUTF8::rawurldecode('tes%20öäü%20\\u00edtest+test'); // 'tes öäü ítest+test'\u003c/code\u003e\n\ne.g:\n'test+test'                     =\u003e 'test+test'\n'D\u0026#252;sseldorf'               =\u003e 'Düsseldorf'\n'D%FCsseldorf'                  =\u003e 'Düsseldorf'\n'D\u0026#xFC;sseldorf'               =\u003e 'Düsseldorf'\n'D%26%23xFC%3Bsseldorf'         =\u003e 'Düsseldorf'\n'DÃ¼sseldorf'                   =\u003e 'Düsseldorf'\n'D%C3%BCsseldorf'               =\u003e 'Düsseldorf'\n'D%C3%83%C2%BCsseldorf'         =\u003e 'Düsseldorf'\n'D%25C3%2583%25C2%25BCsseldorf' =\u003e 'Düsseldorf'\n\n**Parameters:**\n- `T $str \u003cp\u003eThe input string.\u003c/p\u003e`\n- `bool $multi_decode \u003cp\u003eDecode as often as possible.\u003c/p\u003e`\n\n**Return:**\n- `string \u003cp\u003eThe decoded URL, as a string.\u003c/p\u003e`\n\n--------\n\n## regex_replace(string $str, string $pattern, string $replacement, string $options, string $delimiter): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReplaces all occurrences of $pattern in $str by $replacement.\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n- `string $pattern \u003cp\u003eThe regular expression pattern.\u003c/p\u003e`\n- `string $replacement \u003cp\u003eThe string to replace with.\u003c/p\u003e`\n- `string $options [optional] \u003cp\u003eMatching conditions to be used.\u003c/p\u003e`\n- `string $delimiter [optional] \u003cp\u003eDelimiter the the regex. Default: '/'\u003c/p\u003e`\n\n**Return:**\n- `string`\n\n--------\n\n## remove_bom(string $str): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nRemove the BOM from UTF-8 / UTF-16 / UTF-32 strings.\n\nEXAMPLE: \u003ccode\u003eUTF8::remove_bom(\"\\xEF\\xBB\\xBFΜπορώ να\"); // 'Μπορώ να'\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n\n**Return:**\n- `string \u003cp\u003eA string without UTF-BOM.\u003c/p\u003e`\n\n--------\n\n## remove_duplicates(string $str, string|string[] $what): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nRemoves duplicate occurrences of a string in another string.\n\nEXAMPLE: \u003ccode\u003eUTF8::remove_duplicates('öäü-κόσμεκόσμε-äöü', 'κόσμε'); // 'öäü-κόσμε-äöü'\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003eThe base string.\u003c/p\u003e`\n- `string|string[] $what \u003cp\u003eString to search for in the base string.\u003c/p\u003e`\n\n**Return:**\n- `string \u003cp\u003eA string with removed duplicates.\u003c/p\u003e`\n\n--------\n\n## remove_html(string $str, string $allowable_tags): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nRemove html via \"strip_tags()\" from the string.\n\n**Parameters:**\n- `string $str \u003cp\u003eThe input string.\u003c/p\u003e`\n- `string $allowable_tags [optional] \u003cp\u003eYou can use the optio","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoku%2Fportable-utf8","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoku%2Fportable-utf8","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoku%2Fportable-utf8/lists"}