PackageTrack
Sign in Get early access

voku/portable-utf8

Portable UTF-8 library - performance optimized (unicode) string functions for php.

6.1.1 24M downloads/mo #1098 most downloaded on Packagist voku/portable-utf8

What this package is like to depend on

Last release 4 months ago

17 Apr 2026

Ships unpredictably

gaps range from 3 weeks to 3.1 years

Some releases are documented

notes for 98 of 237 stable releases

Nothing withdrawn

no release was ever pulled

12 years old

237 releases · first in 2014

2 releases in the last 12 months

see the full history below

Release timeline

237 releases · Dec 2014 to Apr 2026
2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 60 of 237
  1. 6.1.1 17 Apr 2026
    Release notes

    [*]: update the changelog

    Open source →
    Release notes
    • fixed "UTF8::html_entity_decode()" for PHP 7.x compatibility
    Open source →
  2. 6.1.0 17 Apr 2026
    Release notes
    • run all checks and tests up to PHP 8.5
    • raise the minimum PHP version from 7.0 to 7.1
    • PHP 8.5 compatibility: guard ReflectionProperty::setAccessible() / ReflectionMethod::setAccessible() (deprecated since PHP 8.1), replace null array keys with empty-string keys
    • PHP 8.4 compatibility: updated nullable parameter types and resolved deprecations
    • addressed PHP 8.2 variable interpolation and float-to-int deprecation warnings
    • fixed "UTF8::strcmp()" for negative values and older PHP versions
    • fixed "UTF8::substr_compare()" results across PHP versions
    • fixed "UTF8::substr_in_byte()" to correctly handle PHP 7.x false return from substr()
    • fixed "UTF8::str_camelize()" for all-caps inputs (e.g. FOO BARfooBar, API2URLapi2Url)
    • fixed mb_regex_encoding() call when PHP is built with --disable-mbregex
    • fixed utf8_decode() truncated-sequence warning and improved handling of invalid/truncated UTF-8 sequences
    • fixed "Bootup" class to no longer mutate global mbstring encoding settings during bootstrap; added opt-out via PORTABLE_UTF8__DISABLE_AUTO_ENCODING
    • removed incorrect annotation from "Bootup" class
    • migrated static analysis to PHPStan 2.x
    Open source →
  3. 6.0.13 08 Mar 2023
    Release notes

    [*]: update the changelog

    Open source →
    Release notes
    • added "UTF8::str_limit_in_byte()"
    Open source →
  4. 6.0.12 11 Jan 2023
    Release notes

    [*]: update phpstan + ignore some false-positiv errors

    Open source →
    Release notes
    • added "UTF8::remove_iright()"
    • added "UTF8::remove_ileft()"
    Open source →
  5. 6.0.11 16 Dec 2022
    Release notes

    [*]: update the changelog

    Open source →
    Release notes
    • test with PHP 8.2
    • added "UTF8::getUrlParamFromArray()": Get data from an array via array like string.
    Open source →
  6. 6.0.10 05 Oct 2022
    Release notes

    [*]: update the changelog

    Open source →
    Release notes
    • optimize phpdocs (use positive-int)
    Open source →
  7. 6.0.9 01 Sep 2022
    Release notes

    [*]: update the changelog

    Open source →
    Release notes
    • optimize phpdocs (use int-range)
    Open source →
  8. 6.0.8 31 Aug 2022
    Release notes

    [*]: update the changelog

    Open source →
    Release notes
    • optimize phpdocs (use Conditional Return Types) v2
    Open source →
  9. 6.0.7 31 Aug 2022
    Release notes

    [*]: update the changelog

    Open source →
    Release notes
    • optimize phpdocs (use Conditional Return Types)
    Open source →
  10. 6.0.6 31 Aug 2022
    Release notes

    [*]: update the changelog

    Open source →
    Release notes
    • optimize phpdocs
    • optimize "from"-encoding in "UTF8::encode()"
    • fix error handling in "UTF8::str_split()" for PHP >= 8.0
    • fix error handling in "UTF8::str_capitalize_name_helper()" for PHP >= 8.0
    Open source →
  11. 6.0.5 10 Aug 2022
    Release notes
    • PHP 8.2: Fix ${var} string interpolation deprecation | thanks @Ayesh
    Open source →
  12. 6.0.4 08 Mar 2022
    Release notes
    • "To people of Russia": There is a war in Ukraine right now. The forces of the Russian Federation are attacking civilians.
    Open source →
  13. 6.0.3 30 Jan 2022
    Release notes
    • optimize phpdocs
    Open source →
  14. 6.0.2 24 Jan 2022
    Release notes
    • update vendor (ASCII) lib
    Open source →
  15. 6.0.1 24 Jan 2022
    Release notes
    • add "UTF8::levenshtein()" | thanks @NewEXE
    • update vendor (ASCII) lib
    Open source →
  16. 6.0.0 08 Dec 2021
    Release notes

    Removed:

    • Bootup::filterRequestInputs();
    • Bootup::filterRequestUri();
    • UTF8::GRAPHEME_CLUSTER_RX
    • UTF8::chr_to_int() (please use UTF8::chr_to_decimal())
    • UTF8::hasBom() (please use UTF8::string_has_bom())
    • UTF8::html_decode() (please use UTF8::html_entity_decode())
    • UTF8::int_to_chr() (please use UTF8::decimal_to_chr())
    • UTF8::isAscii() (please use UTF8::is_ascii())
    • UTF8::isBase64() (please use UTF8::is_base64())
    • UTF8::isBinary() (please use UTF8::is_binary())
    • UTF8::isBom() (please use UTF8::is_bom())
    • UTF8::isHtml() (please use UTF8::is_html())
    • UTF8::isJson() (please use UTF8::is_json())
    • UTF8::isUtf16() (please use UTF8::is_utf16())
    • UTF8::isUtf32() (please use UTF8::is_utf32())
    • UTF8::isUtf8() (please use UTF8::is_utf8())
    • UTF8::lcword() (please use UTF8::lcfirst())
    • UTF8::lowerCaseFirst() (please use UTF8::lcfirst())
    • UTF8::normalizeEncoding() (please use UTF8::normalize_encoding())
    • UTF8::removeBOM() (please use UTF8::remove_bom())
    • UTF8::split() (please use UTF8::str_split())
    • UTF8::str_begins() (please use UTF8::str_starts_with())
    • UTF8::str_ends() (please use UTF8::str_ends_with())
    • UTF8::str_ibegins() (please use UTF8::str_istarts_with())
    • UTF8::str_iends() (please use UTF8::str_iends_with())
    • UTF8::str_iindex_first() (please use UTF8::stripos())
    • UTF8::str_iindex_last() (please use UTF8::strripos())
    • UTF8::str_index_first() (please use UTF8::strpos())
    • UTF8::str_index_last() (please use UTF8::strrpos())
    • UTF8::str_transliterate() (please use UTF8::to_ascii())
    • UTF8::str_upper_first() (please use UTF8::ucfirst())
    • UTF8::strchr() (please use UTF8::strstr())
    • UTF8::strichr() (please use UTF8::stristr())
    • UTF8::toAscii() (please use UTF8::to_ascii())
    • UTF8::toIso8859() (please use UTF8::to_iso8859())
    • UTF8::toLatin1() (please use UTF8::to_iso8859())
    • UTF8::to_latin1() (please use UTF8::to_iso8859())
    • UTF8::toUTF8() (please use UTF8::to_utf8())
    • UTF8::ucword() (please use UTF8::ucfirst())
    • UTF8::urldecode_fix_win1252_chars() (please use UTF8::urldecode())
    • UTF8::utf8_fix_win1252_chars() (please use UTF8::fix_simple_utf8())

    Fixed:

    • "UTF8::is_binary()" -> fix for strict usage
    Open source →
  17. 5.4.51 02 Dec 2020
    Release notes
    • "UTF8::rawurldecode()" -> optimize performance
    • "UTF8::urldecode()" -> optimize performance
    • "UTF8::to_boolean() -> fix phpdoc
    Open source →
  18. 5.4.50 12 Nov 2020
    Release notes
    • "UTF8::normalize_whitespace()" -> can now also normalize "control characters" if needed
    Open source →
  19. 5.4.49 11 Nov 2020
    Release notes
    • "UTF8::remove_invisible_characters()" -> can now also remove "control characters" if needed
    • "UTF8::is_printable()" -> fix for non-printable control characters
    Open source →
  20. 5.4.48 07 Nov 2020
    Release notes
    • fix "UTF8::chr()" handling of non "int" code points
    • fix "UTF8::html_encode()" (parameter mismatch for "mb_encode_numericentity()")
    • fix "UTF8::str_ireplace()" (TypeError of "preg_replace()")
    • fix "UTF8::strtonatfold()" (TypeError of "preg_replace()")
    • fix "UTF8::substr_count()" return type if "$haystack" is an empty string
    • compatibility with PHP 8.0 behaviour for:
      • UTF::strstr()
      • UTF::stristr()
      • UTF::strpos()
      • UTF::stripos()
      • UTF::strrpos()
      • UTF::strripos()
    • use native functions from PHP 8.0
      • \str_contains()
      • \str_starts_with()
      • \str_ends_with()
    Open source →
  21. 5.4.47 26 Jul 2020
    Release notes
    • optimize performance by re-using the result of "strlen()"
    Open source →
  22. 5.4.46 18 Jul 2020
    Release notes
    • add "UTF8::str_obfuscate()"
    • optimize phpdocs
    Open source →
  23. 5.4.45 26 May 2020
    Release notes
    • fix UTF8::(l|r)trim | thanks @pmacko
    Open source →
  24. 5.4.44 23 May 2020
    Release notes
    • update vendor (ASCII) lib
    Open source →
  25. 5.4.43 14 May 2020
    Release notes
    • fix auto-generate the "API documentation" in the README (via generate_docs.php)
    • optimize phpdoc comments
    • fix autoloader for test files
    Open source →
  26. 5.4.42 05 May 2020
    Release notes
    • add "UTF8::css_identifier()"
    • optimize phpdoc comments
    • use more template phpdoc-annotation (supported by phpstan and psalm)
    • move code examples into the code
    • auto-generate the "API documentation" in the README (via generate_docs.php)
    Open source →
  27. 5.4.41 06 Mar 2020
    Release notes
    • fix "UTF8::is_utf8*" -> detecting when last byte is incomplete multibyte character | big thanks @daniel-jeffery
    Open source →
  28. 5.4.40 22 Feb 2020
    Release notes
    • fix php notices (run all tests with E_ALL ^ E_USER_WARNING)
    Open source →
  29. 5.4.39 30 Jan 2020
    Release notes
    • "GRAPHEME_CLUSTER_RX" -> is not used anymore and is now deprecated
    • fix "UTF8::decode_mimeheader" fallback -> now we always use the symfony polyfill (mb_decode_mimeheader has different results)
    • fix "UTF8::get_unique_string()" -> use "mt_rand" as fallback
    • fix "UTF8::strtr()" -> now it works also with arrays
    • fix phpdoc for "UTF8::normalize_line_ending()"
    • fix phpdoc for "UTF8::split()" & "UTF8::str_split()"
    • add "UTF8::str_split_array()"
    • add "UTF8::stripos_in_byte()"
    • add "UTF8::emoji_from_country_code()"
    • add many new tests
    • optimize "UTF8::is_url()" + fix deprecated php (>= 7.3) constants
    • optimize "UTF8::str_limit_after_word()" -> optimize the regex
    • optimize "UTF8::substr()" -> combine "if"-statements
    • optimize "UTF8::str_capitalize_name_helper()" -> performance -> use break
    • code style: fix for "UTF8::filter()"
    • code style: do not use "=== false" | "=== true" for "bool" types
    Open source →
  30. 5.4.38 14 Jan 2020
    Release notes
    • add "UTF8::is_url()"
    Open source →
  31. 5.4.37 30 Dec 2019
    Release notes
    • fix nesting function error from "UTF8::substr()"
    Open source →
  32. 5.4.36 30 Dec 2019
    Release notes
    • add "is_punctuation()" && "is_printable()"
    Open source →
  33. 5.4.35 27 Dec 2019
    Release notes
    • add "UTF8::to_int()" && "UTF8::to_string()"
    Open source →
  34. 5.4.34 19 Dec 2019
    Release notes
    • use "@psalm-pure"
    Open source →
  35. 5.4.33 18 Dec 2019
    Release notes
    • use "@psalm-immutable"
    Open source →
  36. 5.4.32 13 Dec 2019
    Release notes
    • fix "UTF8::str_contains_all" -> "strpos(): Empty needle"
    Open source →
  37. 5.4.31 13 Dec 2019
    Release notes
    • update vendor (ASCII) lib
    • optimize phpstan config
    Open source →
  38. 5.4.30 04 Dec 2019
    Release notes
    • fix "UTF8::str_contains_all" -> fix the loop
    Open source →
  39. 5.4.29 02 Dec 2019
    Release notes
    • add "UTF8::has_whitespace()"
    Open source →
  40. 5.4.28 17 Nov 2019
    Release notes
    • use "mb_str_split" with PHP >= 7.4 + mbstring support (performance++)
    • improve performance from "UTF8::string()" (use UTF8::html_entity_decode() for the full string)
    • fix errors reported by phpstan (level 7) / psalm
    Open source →
  41. 5.4.27 11 Nov 2019
    Release notes
    • "UTF8::clean() / UTF8::cleanup()" -> do not remove invisible urlencoded strings by default

      -> problem with e.g. pdf content: "%1b;" -> ...p(CRnAYOD*9a1>VAk^mH%1b;?ZVuX$`P[%...
      
    Open source →
  42. 5.4.26 05 Nov 2019
    Release notes
    • disable "Bootup::filterRequestUri()" && "Bootup::filterRequestInputs()" by default

      Since version 5.4.26 this library will NOT force "UTF-8" by "bootstrap.php" anymore.
      If you need to enable this behavior you can define "PORTABLE_UTF8__ENABLE_AUTO_FILTER", 
      before requiring the autoloader.
      
      ```
      define('PORTABLE_UTF8__ENABLE_AUTO_FILTER', 1);
      ```
      
      Before version 5.4.26 this behavior was enabled by default and you could disable it via "PORTABLE_UTF8__DISABLE_AUTO_FILTER", but the code had potential security vulnerabilities via injecting code while redirecting via ```header('Location ...```.
      This is the reason I decided to add this BC in a bug fix release, so that everybody using the current version will receive the security-fix.
      
    Open source →
  43. 5.4.25 14 Oct 2019
    Release notes
    • update vendor (ASCII) lib
    Open source →
  44. 5.4.24 06 Oct 2019
    Release notes
    • improve performance from "UTF8::UTF8::str_titleize_for_humans()" (use "array_merge" only if needed)
    • improve performance from "UTF8::ucwords()" + "UTF8::lcwords()" (don't use "implode()" if it's not needed)
    Open source →
  45. 5.4.23 27 Sep 2019
    Release notes
    • improve performance from "UTF8::chr_to_decimal()" (now we use iconv if it's available)
    • improve performance from "UTF8::html_entity_decode()" (code cleanup, remove dead code)
    Open source →
  46. 5.4.22 26 Sep 2019
    Release notes
    • improve performance by replacing count($a) === 0 with $a === [] -> so we don't need a function call to check if an array is empty
    Open source →
  47. 5.4.21 17 Sep 2019
    Release notes
    • improve performance by not using return types for private methods -> the code is already checked via phpstan + psalm + phpstorm, ... so no need to check it every time at runtime at this point
    Open source →
  48. 5.4.20 15 Sep 2019
    Release notes
    • fix "preg_quote()" usage
    • fix return type from "mb_encode_numericentity" & "mb_decode_numeric_entity" usage
    • add "@deprecated" for all alias methods
    Open source →
  49. 5.4.19 06 Sep 2019
    Release notes
    • move ASCII functions into a separated package "Portable ASCII"
    Open source →
  50. 5.4.18 21 Aug 2019
    Release notes
    • optimize "UTF8::str_titleize()" + clean-up
    Open source →
  51. 5.4.17 21 Aug 2019
    Release notes
    • fix "UTF8::get_file_type()" -> do not add too simple comparisons, because of false-positive results
    • extend "UTF8::str_titleize()" -> allow to add "word"-chars as new parameter
    Open source →
  52. 5.4.16 15 Aug 2019
    Release notes
    • optimize "UTF8::str_detect_encoding()"
    Open source →
  53. 5.4.15 06 Aug 2019
    Release notes
    • extend "UTF8::range()" -> support for different steps
    • fix "UTF8::str_detect_encoding()" detecting of "UTF-32"
    • revert: use "mb_detect_order()" for "UTF8::str_detect_encoding()"
    Open source →
  54. 5.4.14 02 Aug 2019
    Release notes
    • extend "UTF8::range()" -> support for e.g. "a-z" + different encoding
    Open source →
  55. 5.4.13 01 Aug 2019
    Release notes
    • extend "UTF8::wordwrap_per_line()" -> split the input by "$delimiter"
    Open source →
  56. 5.4.12 31 Jul 2019
    Release notes
    • fix "UTF8::wordwrap_per_line()" -> use unicode version of "wordwrap"
    Open source →
  57. 5.4.11 18 Jul 2019
    Release notes
    • use "mb_detect_order()" for "UTF8::str_detect_encoding()"
    • code clean-up + optimize regex usage
    Open source →
  58. 5.4.10 05 Jul 2019
    Release notes
    • fix "UTF8::str_contains_any()" -> thanks @drupalista-br
    Open source →
  59. 5.4.9 19 Jun 2019
    Release notes
    • sync with "PHP RFC: Add str begin and end functions"
    • fix "UTF8::rawurldecode()" and "UTF8::urldecode()" -> for non multi usage
    Open source →
  60. 5.4.8 07 Jun 2019
    Release notes
    • fix typo in "win1252_to_utf8.php"
    • optimize "UTF8::fix_simple_utf8()"
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive