1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 05:21:02 +02:00
Files
archived-php-src/ext/zlib/tests/gzgetss.phpt
Nikita Popov d9acfa45b8 Deprecate fgetss() and gzgetss()
SplFileObject::fgetss() will also generate a deprecation notice
through an internal call to fgetss().

Part of RFC https://wiki.php.net/rfc/deprecations_php_7_3.
2018-07-21 22:38:35 +02:00

33 lines
827 B
PHP

--TEST--
gzgetss Get line from gz-file pointer and strip HTML tags - function
--CREDITS--
marcosptf - <marcosptf@yahoo.com.br>
--SKIPIF--
<?php
if(!extension_loaded("zlib")){die("skip - ZLIB extension not loaded");}
?>
--FILE--
<?php
$handle = gzopen(__DIR__ . '/gzgetss.gz', 'r');
while (!gzeof($handle)){
$buffer = gzgetss($handle, 4096, "<code>");
print($buffer);
}
gzclose($handle);
?>
--EXPECTF--
Deprecated: Function gzgetss() is deprecated in %s on line %d
Deprecated: Function gzgetss() is deprecated in %s on line %d
Deprecated: Function gzgetss() is deprecated in %s on line %d
<code>stringgzgetss(resource $zp, int $length [, string $allowable_tags ]);<code/>
Deprecated: Function gzgetss() is deprecated in %s on line %d
Deprecated: Function gzgetss() is deprecated in %s on line %d