legacy_mbstring/mb_detect_encoding

Old behavior of mbstring(mb_detect_encoding) (PHP 8.0)

Maintainers

Package info

github.com/youkidearitai/legacy_mbstring

Language:C

Type:php-ext

Ext name:ext-legacy_mbstring

pkg:composer/legacy_mbstring/mb_detect_encoding

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v0.2.1 2026-04-08 04:12 UTC

This package is auto-updated.

Last update: 2026-04-08 08:55:16 UTC


README

PHP 8.0 fallback mbstring functions. However, I hope without using this...

Why legacy_mbstring?

mb_detect_encoding is not have backward compatible since PHP 8.1. I'm not have interesting this function's changes behavior, but many PHP users are seems confused.

examples:

mbstring should to moving forward. However, some PHP users left behind old behavior. This fact is created that motivate it.

Instllation

I recommend using phpize.

$ git clone https://github.com/youkidearitai/legacy_mbstring
$ cd legacy_mbstring
$ phpize
$ ./configure
$ make
$ make install

Functions

legacy_mb_detect_encoding

Old behavior (<= PHP 8.0) mb_detect_encoding

legacy_mb_detect_encoding(string $string, array|string|null $encodings = null, bool $strict = false): string|false