|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-02-27 14:01 UTC] cmb@php.net
-Status: Open
+Status: Not a bug
-Assigned To:
+Assigned To: cmb
[2020-02-27 14:01 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 23:00:01 2025 UTC |
Description: ------------ First, My main concern is FALSE and NULL values not filter function array_filter. Second, There should be more parameter for array_filter for string and integer type. Test script: --------------- $tag_string = 'logo,sky,bird,-0,fire,-1,0,2333,false,logo,FALSE,null,COMPANY,Fire,NULL'; $tag_arr = explode(',', $tag_string ); $tag_arr = array_filter($tag_arr); print_r($tag_arr); Expected result: ---------------- Array ( [0] => logo [1] => sky [2] => bird [3] => fire [4] => 2333 [5] => logo [6] => COMPANY [7] => Fire ) Actual result: -------------- Array ( [0] => logo [1] => sky [2] => bird [3] => -0 [4] => fire [5] => -1 [7] => 2333 [8] => false [9] => logo [10] => FALSE [11] => null [12] => COMPANY [13] => Fire [14] => NULL )