|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-03-27 20:37 UTC] nikic@php.net
-Status: Open
+Status: Closed
-Package: Feature/Change Request
+Package: *General Issues
-Assigned To:
+Assigned To: nikic
[2016-03-27 20:37 UTC] nikic@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 23:00:01 2025 UTC |
Description: ------------ It would be desirable to add arguments to the callback function during the execution of array_filter(), like so: <?php function filterMPEG($line,$extra) { return preg_match("#Codec {$extra}#",$line); } $a = array('Filter Low Pass','Codec MP2','Codec MP4'); // output MPEG2 codecs print_r(array_filter($a,'filterMPEG','MP2'); // output MPEG4 codecs print_r(array_filter($a,'filterMPEG','MP4'); ?>