Force minimum TLS version for stream connections

I’m looking to force a minimum version of TLS 1.2 for my client connection. I can do something like this:

$client = stream_socket_client('tlsv1.2://www.example.com:443');

This wrapper forces a TLS 1.2 connection. But doesn’t allow for upgrades to 1.3 when the server is capable, and doesn’t connect at all if the server only offers 1.3. There don’t seem to be any options for stream_context_create() to affect the TLS version, and I don’t want to use the curl extension. Is there any possibility to do this?