Mcrypt Extension for PHP 7.1 from Mojave does not use infusion

I use macOS Mojave (10.14.3) and it already has apache2 and php 7.1 which are configured.

I want mcrypt installed but all information on the Internet, including this usage, is brewed. I did not install php using brew, so I'm looking for a solution to install mcrypt using a non-brewed method. Is it possible ?

I have pear –
I found a solution for PHP 7.2 of Ubuntu: