Paypal:TLS 1.2测试在ssh中工作,但在浏览器中不起作用

I created the following script to check that hosting uses TLS 1.2 for encryption:

<?php
$ch = curl_init('https://tlstest.paypal.com/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt ($ch, CURLOPT_SSLVERSION, 6); //TLS v1.2
$data = curl_exec($ch);
curl_close($ch);

print $data;

If the call is made using TLS 1.2, paypal returns "PayPal_Connection_OK".

When I call it directly in ssh I get successful response:

$ php ./tls.php 
PayPal_Connection_OK

But when I put this script into httpdocs dir and call it through browser I get:

ERROR! Connection is using TLS version lesser than 1.2. Please use TLS1.2

What can be the issue?