1--TEST--
2Test deflate_add() errors with ZLIB_BLOCK in zlib < 1.2.4
3--SKIPIF--
4<?php
5if (!extension_loaded("zlib")) {
6    print "skip - ZLIB extension not loaded";
7}
8if (ZLIB_VERNUM >= 0x1240) {
9    print "skip - ZLIB < 1.2.4 required for test";
10}
11?>
12--FILE--
13<?php
14
15$resource = deflate_init(ZLIB_ENCODING_GZIP);
16var_dump(deflate_add($resource, "aaaaaaaaaaaaaaaaaaaaaa", ZLIB_BLOCK));
17
18?>
19===DONE===
20--EXPECTF--
21Warning: deflate_add(): zlib >= 1.2.4 required for BLOCK deflate; current version: %s in %s on line %d
22bool(false)
23===DONE===
24