Req #53037 [Opn]: activate FILTER_FLAG_EMPTY_STRING_NULL
| From: | jinmoku at hotmail dot com | Date: | Mon, 28 Mar 2011 22:21:22 +0000 |
| Subject: | Req #53037 [Opn]: activate FILTER_FLAG_EMPTY_STRING_NULL | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-159824@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53037&edit=1
ID: 53037
User updated by: jinmoku at hotmail dot com
Reported by: jinmoku at hotmail dot com
Summary: activate FILTER_FLAG_EMPTY_STRING_NULL
Status: Open
Type: Feature/Change Request
Package: Filter related
-PHP Version: 5.3.3
+PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
Added patch
Previous Comments:
------------------------------------------------------------------------
[2010-10-10 18:13:04] jinmoku at hotmail dot com
Description:
------------
Hi, there are any plan for FILTER_FLAG_EMPTY_STRING_NULL ?
And why 'NULL' insteed 'FALSE' ?
;)
Test script:
---------------
$str = '';
$filter = filter_var($str, FILTER_DEFAULT,
FILTER_FLAG_EMPTY_STRING_NULL);
var_dump($filter);
Expected result:
----------------
NULL
Actual result:
--------------
string(0) ""
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53037&edit=1