note 75293 deleted from function.array-filter by cmb

From: Date: Sun, 06 Oct 2019 08:11:48 +0000
Subject: note 75293 deleted from function.array-filter by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-212496@lists.php.net to get a copy of this message
Note Submitter: leon at darkk dot net dot ru ---- Here is a way to get customizable filter <?php function blablabla() { .... $new = getNewUidls(); class UidlFilter { function UidlFilter($uidls) { $this->uidls = $uidls; } function filter($metamsg) { return in_array($metamsg['uidl'], $this->uidls); } } $msglist = array_filter($msglist, array(new UidlFilter($new), 'filter'); .... } ?>

« previous php.notes (#212496) next »