how to install mcrypt php extension?

anyone can explain me how to install it for PHP 7.4

CentOS 7.

I found this How to install mcrypt on PHP 7.3.3 ubuntu - Stack Overflow and manage to execute in centos but i don’t know how to point to a specific php version, because default version shows 7.1 but i’m using 7.4 on sites

root@ pecl install mcrypt-1.0.2
pecl/mcrypt requires PHP (version >= 7.2.0, version <= 7.4.0, excluded versions: 7.4.0), installed version is 7.1.33-3
No valid packages found
install failed
root@ php -version
PHP 7.1.33-3 (cli) (built: Nov 25 2019 12:03:34) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.33-3

I did a fresh installation and is solved, mcrypt is included by default on php7.4