constant_time_encoding
constant_time_encoding copied to clipboard
Remove `mbstring.func_overload` compatibility layer
The mbstring.func_overload misfeature no longer exists in PHP 8.x which is now the minimally supported version. Thus we can directly use strlen() and substr() and avoid the indirection through the Binary class, improving performance.
The Binary class is used in a lot of other software that depends on this library.
The
Binaryclass is used in a lot of other software that depends on this library.
That's why I did not remove it and just marked it as Deprecated.
It's not deprecated, either. Too many things use it, and marking it as deprecated will cause downstream issues with e.g. Psalm.
Okay. Are you requesting me to drop the Deprecation commit? Shall I make any other changes to this PR or are the first two commits good?