How to detect HTTPS SSL

You can detect HTTPS with the code line below in PHP