As far as I know it is not (yet) possible sending http2 requests using the PHP sockets / stream API.
But it is possible to do that when using the php curl extension (a recent one / compiled with http2 support).
See fe. https://github.com/guzzle/guzzle/issues/1249 for someone else working in the same direction