Doc #64205 [NEW]: Option 'default' not documented for Filter Functions
| From: | goozak at gmail dot com | Date: | Wed, 13 Feb 2013 15:13:31 +0000 |
| Subject: | Doc #64205 [NEW]: Option 'default' not documented for Filter Functions | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-9520@lists.php.net to get a copy of this message | ||
From: goozak at gmail dot com
Operating system:
PHP version: Irrelevant
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:Option 'default' not documented for Filter Functions
Description:
------------
The option 'default' does not seem to be documented anywhere in the "Types
of filters" section (http://www.php.net/manual/en/filter.filters.php).
For example, the script below will return (int) 0 if 'id' doesn't exist or
doesn't validate as INT. This is not documented anywhere, which makes me
wonder if there are other 'global' options like that.
Not sure where it should be documented though... Specific filter options
are documented in "Validate filters" page
(http://www.php.net/manual/en/filter.filters.validate.php).
Test script:
---------------
var_dump(filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT, array('options'
=> array('default' => 0))));
--
Edit bug report at https://bugs.php.net/bug.php?id=64205&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64205&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64205&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64205&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=64205&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=64205&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=64205&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=64205&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=64205&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=64205&r=support
Expected behavior: https://bugs.php.net/fix.php?id=64205&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=64205&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=64205&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=64205&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64205&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=64205&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=64205&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=64205&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64205&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=64205&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=64205&r=mysqlcfg