for windows it might be better to just get the setup at http://gnuwin32.sourceforge.net/packages/openssl.htm
instead of the sources and try to compile 'em yourself ^_~
In order to use the OpenSSL functions you need to install the » OpenSSL library. PHP 5 requires at least OpenSSL >= 0.9.6. However later PHP 5 versions have some compilation issues and should be used at least with OpenSSL >= 0.9.8 which is also a minimal version for PHP 7.0. Other versions (PHP >= 7.1.0) require OpenSSL >= 1.0.1.
You are strongly encouraged to use the most recent OpenSSL version, otherwise your web server could be vulnerable to attack.
for windows it might be better to just get the setup at http://gnuwin32.sourceforge.net/packages/openssl.htm
instead of the sources and try to compile 'em yourself ^_~