Conversation
ext/zlib/tests/gzgetss.phpt
Outdated
There was a problem hiding this comment.
Always use absolute paths in PHPT (otherwise the files may not be found):
$handle = gzopen(__DIR__ . '/gzgetss.gz', 'r');
|
hi @cmb69 ! i really need your help, i think i don't understand what the third argument work ( [, string $allowable_tags ] ); follow the steps that i did: 2)the tag 'opentag' h1 'closetag' on gzgetss.test is this: 3)i convert the .test file to gz file: 4)i ran the gzgetss.phpt test and the anwser was it: F Time: 438 ms, Memory: 1.75Mb There was 1 failure:
Description- - string gzgetss - ( resource $zp - , int $length - [, string $allowable_tags - ] ) - - Identical to gzgets(), except that - gzgetss() attempts to strip any HTML and PHP - tags from the text it reads. - - - - Parameters - - - +string gzgetss(resource $zp, int $length [, string $allowable_tags ]); +zp - - - The gz-file pointer. It must be valid, and must point to a file - successfully opened by >gzopen(). - - - +length - - - The length of data to get. - - - +allowable_tags - - - You can use this optional parameter to specify tags which should not - be stripped. - - - - - - - Return Values - - The uncompressed and stripped string, or FALSE on error. - - - - Examples - - - Example #1 gzgetss() example - + +<?php$handle = gzopen()) { $buffer = gzgetss($handle?>FAILURES! My question is, what i doing wrong? ill really apreciate your help. :-) |
|
gzgetss() basically works like strip_tags() with regard to the $allowable_tags parameter. See the example in the docs, and consider also: |
|
👍 |
|
hi @cmb69 , i rewrote the test, i think now is correct! Thanks |
|
Comment on behalf of cmb at php.net: Squashed and applied. Please try to write more meaningful commit messages next time. :) |
|
thanks 👍 |
this is a test to gzgetss();
tests to this function don't exist yet;
Thanks!
:-)