1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/zlib/tests/gzuncompress_error1.phpt
Nikita Popov 7485978339 Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00

32 lines
723 B
PHP

--TEST--
Test gzuncompress() function : error conditions
--EXTENSIONS--
zlib
--FILE--
<?php
echo "*** Testing gzuncompress() : error conditions ***\n";
echo "\n-- Testing with a buffer that is too small --\n";
$data = 'string_val';
$short_len = strlen($data) - 1;
$compressed = gzcompress($data);
var_dump(gzuncompress($compressed, $short_len));
echo "\n-- Testing with incorrect arguments --\n";
var_dump(gzuncompress(123));
?>
--EXPECTF--
*** Testing gzuncompress() : error conditions ***
-- Testing with a buffer that is too small --
Warning: gzuncompress(): insufficient memory in %s on line %d
bool(false)
-- Testing with incorrect arguments --
Warning: gzuncompress(): data error in %s on line %d
bool(false)