Req #63148 [Opn]: Pass array key to array_filter function callback

From: Date: Tue, 25 Sep 2012 02:49:02 +0000
Subject: Req #63148 [Opn]: Pass array key to array_filter function callback
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-173696@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63148&edit=1 ID: 63148 Updated by: laruence@php.net Reported by: hradtke@php.net Summary: Pass array key to array_filter function callback Status: Open Type: Feature/Change Request Package: Arrays related PHP Version: 5.4Git-2012-09-24 (Git) Block user comment: N Private report: N New Comment: Hey, we have various array functions, and I do believe this can be done in another ways, so, why introduce this? thanks Previous Comments: ------------------------------------------------------------------------ [2012-09-24 09:24:29] hradtke@php.net PR: https://github.com/php/php-src/pull/202 ------------------------------------------------------------------------ [2012-09-24 09:18:40] hradtke@php.net Description: ------------ I would like to change array_filter to following prototype: proto array array_filter(array input [, mixed callback, bool pass_key]) The callback prototype would change to: proto bool callback(mixed value [, mixed key]) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63148&edit=1

« previous php.bugs (#173696) next »