In order to use the OpenSSL functions you need to install the » OpenSSL library. PHP 7.0 requires OpenSSL >= 0.9.8, < 1.2. PHP 7.1-8.0 requires OpenSSL >= 1.0.1, < 3.0. PHP >= 8.1 requires OpenSSL >= 1.0.2, < 4.0.
You are strongly encouraged to use a maintained OpenSSL version, otherwise your web server could be vulnerable to attack.