PHPackages                             schnittstabil/array\_some - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. schnittstabil/array\_some

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

schnittstabil/array\_some
=========================

Checks whether some element resp. key in an array passes a test implemented by a callback function.

1.0.0(10y ago)1113MITPHPPHP &gt;=5.6.0

Since Apr 11Pushed 10y ago1 watchersCompare

[ Source](https://github.com/schnittstabil/array_some)[ Packagist](https://packagist.org/packages/schnittstabil/array_some)[ RSS](/packages/schnittstabil-array-some/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (5)Versions (2)Used By (0)

Schnittstabil\\ArraySome [![Build Status](https://camo.githubusercontent.com/c826bea62534a9eafc9ed2bb1852a5efbaf18351ce1b20f51ccb74c17d3f62da/68747470733a2f2f7472617669732d63692e6f72672f7363686e69747473746162696c2f61727261795f736f6d652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/schnittstabil/array_some) [![Coverage Status](https://camo.githubusercontent.com/455a42f6cafa1a6b92fb4a9b40cd5e31f1952660e966ce3d186b3e42fa893014/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f7363686e69747473746162696c2f61727261795f736f6d652f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/schnittstabil/array_some?branch=master) [![Code Climate](https://camo.githubusercontent.com/b4bf95da5c35e42f2dbfba3f9d70a2845c8213057e23952e9270db547b2b357b/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f7363686e69747473746162696c2f61727261795f736f6d652f6261646765732f6770612e737667)](https://codeclimate.com/github/schnittstabil/array_some)
================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#schnittstabilarraysome---)

[![SensioLabsInsight](https://camo.githubusercontent.com/184e5229b8bacdbe07a88457ba8a6dccaae86179fded70af432dd061071ca559/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f63396265366164332d663765322d343666392d393936362d6639303632343232333431652f6269672e706e67)](https://insight.sensiolabs.com/projects/c9be6ad3-f7e2-46f9-9966-f9062422341e)

> Checks whether some element resp. key in an array passes a test implemented by a callback function

Install
-------

[](#install)

```
$ composer require schnittstabil/array_some

```

Usage
-----

[](#usage)

```
use function Schnittstabil\ArraySome\array_some;

array_some(['l', 'e', 'e', 't'], 'is_string'); // => true
array_some([ 1,   3,   3,   7 ], 'is_string'); // => false

use function Schnittstabil\ArraySome\array_some_key;

array_some_key(['unicorns' => 24], 'is_string'); // => true
array_some_key([42 => 'unicorns'], 'is_string'); // => false
```

API
---

[](#api)

```
/**
 * Checks whether some element in the array passes the test implemented by the callback function.
 *
 * @param array    $array    The array to iterate over
 * @param callable $callback The callback function to use
 *
 * @return bool
 */
function array_some(array $array, callable $callback);

/**
 * Checks whether some key in the array passes the test implemented by the callback function.
 *
 * @param array    $array    The array to iterate over
 * @param callable $callback The callback function to use
 *
 * @return bool
 */
function array_some_key(array $array, callable $callback);
```

License
-------

[](#license)

MIT © [Michael Mayer](http://schnittstabil.de)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3733d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6059032?v=4)[Michael Mayer](/maintainers/schnittstabil)[@schnittstabil](https://github.com/schnittstabil)

---

Top Contributors

[![schnittstabil](https://avatars.githubusercontent.com/u/6059032?v=4)](https://github.com/schnittstabil "schnittstabil (1 commits)")

---

Tags

arraykeyelementanyexistssome

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/schnittstabil-array-some/health.svg)

```
[![Health](https://phpackages.com/badges/schnittstabil-array-some/health.svg)](https://phpackages.com/packages/schnittstabil-array-some)
```

###  Alternatives

[doctrine/collections

PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.

6.0k423.8M1.4k](/packages/doctrine-collections)[symfony/property-access

Provides functions to read and write from/to an object or array using a simple string notation

2.8k309.5M3.1k](/packages/symfony-property-access)[nette/utils

🛠 Nette Utils: lightweight utilities for string &amp; array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.

2.1k417.9M1.7k](/packages/nette-utils)[league/config

Define configuration arrays with strict schemas and access values with dot notation

565323.7M35](/packages/league-config)[cuyz/valinor

Dependency free PHP library that helps to map any input into a strongly-typed structure.

1.5k13.2M162](/packages/cuyz-valinor)[openlss/lib-array2xml

Array2XML conversion library credit to lalit.org

31053.8M50](/packages/openlss-lib-array2xml)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
