Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:7064 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26102 invoked by uid 1010); 13 Jan 2004 21:20:01 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 26028 invoked from network); 13 Jan 2004 21:20:00 -0000 Received: from unknown (HELO miranda.org) (209.58.150.153) by pb1.pair.com with SMTP; 13 Jan 2004 21:20:00 -0000 Received: (qmail 30414 invoked by uid 546); 13 Jan 2004 21:17:43 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 13 Jan 2004 21:17:43 -0000 Date: Tue, 13 Jan 2004 16:17:43 -0500 (EST) X-X-Sender: adam@miranda.org To: Andrey Hristov cc: internals@lists.php.net In-Reply-To: <40045BB4.4050000@hristov.com> Message-ID: References: <40045BB4.4050000@hristov.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] new function? From: adam@trachtenberg.com (Adam Maccabee Trachtenberg) On Tue, 13 Jan 2004, Andrey Hristov wrote: > I know HEAD is freezed, but anyway to ask whether a new function > in_array_all() can be added. It works like in_array() but checks > whether all needles are in the stack array. Do we really need this either way? function in_array_all($needles, $haystack, $strict = false) { foreach($needles as $needle) { if (!in_array($needle, $haystack, $strict)) { return false; } } return true; } -adam -- adam@trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today!