PHP 5.x/7.x polyfill for mcrypt extension.
With Composer:
composer require phpseclib/mcrypt_compat
Although nofb is supported ofb is not. Further, mcrypt_compat's ncfb implementation has some incompatibles with mcrypt's implementation where mcrypt_generic and mdecrypt_generic are concerned. The unit tests elaborate.