summaryrefslogtreecommitdiff
path: root/ext/zlib/tests/bug61287.phpt
blob: 769446a8cdf98c1858277235d76f80e64932076b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
bug #61287 - inflate needs the terminating null byte
--SKIPIF--
<?php extension_loaded("zlib") or die("SKIP need zlib");
--FILE--
<?php
$array = array(
    'region_id' => 1,
    'discipline' => 23,
    'degrees' => array(),
    'country_id' => 27
);

$serialized = serialize($array);

$deflated = gzdeflate($serialized, 9);
$inflated = gzinflate($deflated);

echo strlen($inflated),"\n";
?>
Done
--EXPECT--
92
Done