original_string: public function startTls()
      {
          if ($this->connected && !$this->secure) {
              if (defined('STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT')) {
                  $mode = STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT
                      | STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT
                      | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT;
              } else {
                  $mode = STREAM_CRYPTO_METHOD_TLS_CLIENT;
              }
              if (@stream_socket_enable_crypto($this->_stream, true, $mode) === true) {
                  $this->_secure = true;
                  return true;
              }
          }
  
          return false;
      }
code: public function startTls()
      {
          if ($this->connected && !$this->secure) {
              if (defined('STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT')) {
                  $mode = STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT
                      | STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT
                      | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT;
              } else {
                  $mode = STREAM_CRYPTO_METHOD_TLS_CLIENT;
              }
              if (@stream_socket_enable_crypto($this->_stream, true, $mode) === true) {
                  $this->_secure = true;
                  return true;
              }
          }
  
          return false;
      }
code_tokens: public function startTls ( ) { if ( $ this -> connected && ! $ this -> secure ) { if ( defined ( 'STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT' ) ) { $ mode = STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT ; } else { $ mode = STREAM_CRYPTO_METHOD_TLS_CLIENT ; } if ( @ stream_socket_enable_crypto ( $ this -> _stream , true , $ mode ) === true ) { $ this -> _secure = true ; return true ; } } return false ; }
docstring: Start a TLS connection.
  
  @return boolean  Whether TLS was successfully started.
docstring_tokens: Start a TLS connection .