Doc #64205 [Opn]: Option 'default' not documented for Filter Functions

From: Date: Thu, 24 Oct 2013 05:48:58 +0000
Subject: Doc #64205 [Opn]: Option 'default' not documented for Filter Functions
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-10541@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64205&edit=1 ID: 64205 Updated by: yohgaki@php.net Reported by: goozak at gmail dot com Summary: Option 'default' not documented for Filter Functions Status: Open Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant Block user comment: N Private report: N New Comment: "default" is mentioned in example, but it's not documented. "default" is available since PHP 5.2.1, it seems. Previous Comments: ------------------------------------------------------------------------ [2013-02-13 15:13:31] 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)))); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=64205&edit=1

« previous php.doc.bugs (#10541) next »