Closed
Description
Server Name Indication (SNI) works just fine on any recent PHP version and HHVM.
However, this is currently broken for legacy PHP versions (PHP < 5.6). This was introduced by #43 which landed in v0.5.0 and v0.4.5 (older versions work fine on legacy PHP versions). I stumbled upon this while trying to issue HTTPS requests against a host that requires proper SNI support.
This is a known issue for PHP < 5.6, see also https://github.com/amphp/socket/blob/aa784fe3a18fa8514e57714142488f629073c7a9/lib/functions.php#L87-90