See the actual byte-level TLS handshake, the same output openssl s_client -trace gives you on the command line, without needing a terminal.
openssl-trace.php
shell_exec()