php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #60060 the explaination of the argument allowable_tags for strip_tags() is wrong
Submitted: 2011-10-14 05:43 UTC Modified: 2011-12-03 06:32 UTC
From: zhkzyth at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 5.3.8 OS: windows7
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: zhkzyth at gmail dot com
New email:
PHP Version: OS:

 

 [2011-10-14 05:43 UTC] zhkzyth at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.strip-tags#refsect1-function.strip-
tags-parameters
---
the note says that the second parameter allowable_tags "sees a tag as a case-
insensitive string between < and the first whitespace or >."

But it gives a wrong example,because strip_tags("<br/>", "<br>") return a 
string.just see the test script.

And the right example should be like below script:
$tt=strip_tags("<br/>","<br >");//just give the second prarameter a whitespace

var_dump($tt);//which returns string(0)""

Test script:
---------------
$test=strip_tags("<br/>","<br>");

var_dump($test);//which returns string(5)""


$tt=strip_tags("<br/>","<br >");//just give the second prarameter a whitespace

var_dump($tt);//which returns string(0)""


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-12-03 06:32 UTC] frozenfire@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

So far as I can tell, the documentation indicates the behaviour. I'm not entirely 
sure what you're trying to say is wrong, but I think you may just understand what 
the documentation is saying.
 [2011-12-03 06:32 UTC] frozenfire@php.net
-Status: Open +Status: Bogus
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 00:01:31 2025 UTC