Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Rob Allen:
Using HTTP/2 with PHP 7 on Mac
Aug 31, 2016 @ 17:54:47

Rob Allen has a quick post to his site showing you how to use PHP 7 with HTTP/2 on OSX with some help form the Homebrew package management tool and curl with HTTP/2 support.

If you want to use HTTP/2 with PHP on OS X, you need a version of curl compiled with HTTP/2 support. You can then link your PHP's curl extension to this version.

He walks you through the "brew install" of the required packages, correctly linking the curl binary and testing the HTTP/2 support. He also includes a bit of sample code using Guzzle to make a HTTP/2 request to a remote site (in this case www.google.it) and the output of the full response with debugging enabled.

tagged:

Link: https://akrabat.com/using-http2-with-php7-on-mac/


Trending Topics: