#50664 [NEW]: Documentation should more clearly list actual behavior
| From: | deltaforce2 at gmx dot de | Date: | Tue, 05 Jan 2010 00:04:38 +0000 |
| Subject: | #50664 [NEW]: Documentation should more clearly list actual behavior | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-3616@lists.php.net to get a copy of this message | ||
From: deltaforce2 at gmx dot de
Operating system: Linux
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: Documentation should more clearly list actual behavior
Description:
------------
The Documentation for strip_tags() should mention that the function does
not actually look for any html or php Tags but actually just searches for
the "<" sign and removes everything from that Position until it encounters
a ">" sign. If there is no ">" in the String the whole string will be cut
from the Position of the "<" sign.
Reproduce code:
---------------
---
From manual page: function.strip-tags
---
<?php
$text = "This text has no HTML or PHP Tags and is <50 characters in total
length but it wont be listed!";
echo strip_tags($text) . '<br/>';
$text = "This Text <span>Text has HTML Tags</span> and will be listed
correctly.";
echo strip_tags($text);
?>
Expected result:
----------------
Both Text Variables to be returned completely with the exception of the
<span> and </span> which are html tags. But thats another issue which I
doubt will be fixed. So the Added Note in the Documentation should suffice.
Actual result:
--------------
This text has no HTML or PHP Tags and is
This Text Text has HTML Tags and will be listed correctly.
--
Edit bug report at http://bugs.php.net/?id=50664&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50664&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50664&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50664&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=50664&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50664&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=50664&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=50664&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=50664&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=50664&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=50664&r=support
Expected behavior: http://bugs.php.net/fix.php?id=50664&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=50664&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=50664&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=50664&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50664&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=50664&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=50664&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=50664&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=50664&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=50664&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=50664&r=mysqlcfg