If you have PHP compiled to use this function then, yes, you can use it to create certificates for securing a website. However, the certificate won't be signed by a "trusted authority" so you will receive an error/warning when visiting the site using that certificate.
Also, if you just want a self signed certificate you can create it directly with OpenSSL rather than going through PHP.
Bookmarks