xref: /PHP-7.3/ext/zlib/tests/ob_003.phpt (revision f258e9b8)
1--TEST--
2zlib.output_compression
3--SKIPIF--
4<?php
5if (!extension_loaded("zlib")) die("skip need ext/zlib");
6if (false === stristr(PHP_SAPI, "cgi")) die("skip need sapi/cgi");
7?>
8--INI--
9zlib.output_compression=0
10--ENV--
11HTTP_ACCEPT_ENCODING=gzip
12--POST--
13dummy=42
14--FILE--
15<?php
16ini_set("zlib.output_compression", 1);
17echo "hi\n";
18?>
19--EXPECTF--
20�%a
21--EXPECTHEADERS--
22Content-Encoding: gzip
23Vary: Accept-Encoding
24