Skip to content

Commit 83d3d72

Browse files
committed
README: discuss PHPSECLIB_MCRYPT_TARGET_VERSION
1 parent 8c338db commit 83d3d72

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,7 @@ composer require phpseclib/mcrypt_compat
4848
- stream
4949

5050
mcrypt_compat's `ncfb` implementation has some incompatibles with mcrypt's implementation where `mcrypt_generic` and `mdecrypt_generic` are concerned. The unit tests elaborate.
51+
52+
## Emulating older PHP versions
53+
54+
The mcrypt extension's behavior underwent changes as new versions of PHP were released. By default mcrypt_compat emulates the behavior of PHP 7.1 but if you need to emulate how mcrypt behaved in, say, PHP 5.3.0, you may do so by doing `define('PHPSECLIB_MCRYPT_TARGET_VERSION', '5.3.0');` before including vendor/autoload.php (if you're using this with Composer).

0 commit comments

Comments
 (0)