Handling QPrint via mbstring is deprecated; use quoted_printable_encode/quoted_printable_decode

Description

Since PHP 8.2, several encodings were dropped from mbstring, including QPrint.

This is a deprecation, so the feature is available until PHP 9.

Example

<?php

mb_convert_encoding('foo', 'qprint');

?>

Solutions

  • It is recommended to use the quoted_printable_encode() and quoted_printable_decode() functions to do this.

Changed Behavior

This error may appear following an evolution in behavior, in previous versions. See mb_convert_encoding.

Static Analysis

This error may be tracked down with the following static analysis rules: Structures/DeprecatedMbEncoding.