Bug #79312 [NEW]: array_filter should be more improvement

From: Date: Thu, 27 Feb 2020 13:33:35 +0000
Subject: Bug #79312 [NEW]: array_filter should be more improvement
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-225749@lists.php.net to get a copy of this message
From: npsingh dot sb at gmail dot com Operating system: Window 7 PHP version: 7.3.15 Package: Filter related Bug Type: Bug Bug description:array_filter should be more improvement 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 ) -- Edit bug report at https://bugs.php.net/bug.php?id=79312&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79312&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79312&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79312&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79312&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79312&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79312&r=support Expected behavior: https://bugs.php.net/fix.php?id=79312&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79312&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79312&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79312&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79312&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79312&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79312&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79312&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79312&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79312&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79312&r=mysqlcfg

« previous php.bugs (#225749) next »