-
Notifications
You must be signed in to change notification settings - Fork 7.8k
test to gzgetss function #1479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test to gzgetss function #1479
Conversation
?> | ||
--FILE-- | ||
<?php | ||
$handle = gzopen('gzgetss.gz', 'r'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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!
:-)