I don't like the CS for this bit... I usually did it like:

if (
    (php_stream_xport_crypto_setup(stream, STREAM_CRYPTO_METHOD_TLS_CLIENT, NULL TSRMLS_CC) < 0) ||
    (php_stream_xport_crypto_enable(stream, 1 TSRMLS_CC) < 0)
) {