php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #64205 Option 'default' not documented for Filter Functions
Submitted: 2013-02-13 15:13 UTC Modified: 2013-10-26 23:06 UTC
From: goozak at gmail dot com Assigned: yohgaki (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: goozak at gmail dot com
New email:
PHP Version: OS:

 

 [2013-02-13 15:13 UTC] goozak at gmail dot com
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))));


Patches

hyper-zon-a (last revision 2013-05-23 20:18 UTC by herman at dwpcons dot co dot za)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-10-24 05:48 UTC] yohgaki@php.net
"default" is mentioned in example, but it's not documented.

"default" is available since PHP 5.2.1, it seems.
 [2013-10-24 06:16 UTC] yohgaki@php.net
Automatic comment from SVN on behalf of yohgaki
Revision: http://svn.php.net/viewvc/?view=revision&revision=331940
Log: Doc Bug 64205 Option 'default' not documented for Filter Functions
 [2013-10-26 23:06 UTC] yohgaki@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: yohgaki
 [2013-10-26 23:06 UTC] yohgaki@php.net
Why this is not closed automatically? "Fix"/"Fixed" is required in commit log?
Manually closed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 11:01:37 2024 UTC