PHPackages                             flyandi/is - 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. flyandi/is

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

flyandi/is
==========

A collection of useful is conditions.

019.0k↓50%PHP

Since Oct 26Pushed 10y ago1 watchersCompare

[ Source](https://github.com/flyandi/php-is)[ Packagist](https://packagist.org/packages/flyandi/is)[ RSS](/packages/flyandi-is/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Php Is
======

[](#php-is)

Is for PHP is a small library that provides some handy methods to quickly check or validate the contents of a variable.

Install it
----------

[](#install-it)

Install the library via composer:

`composer install flyandi/is`

How to use it
-------------

[](#how-to-use-it)

Pretty straightforward. The library exposes the static class `Is` that contains all the evaluating methods, e.g.:

```
$AnArray = ['red', 'blue', green];

$AnColor = '#00FF00';

if(Is::_array($AnArray)) echo "Yes, it's an array!";

if(Is::hexcolor($AnColor)) echo "This is a valid color code.";
```

Methods
-------

[](#methods)

The Is library implements the following methods currently:

MethodDescription`iterable`Checks if an object can be iterated, e.g. `forEach``fn`Returns true if the argument is an function`object`Returns true if the argument is an object`array`Returns true if the argument is an array`string`Returns true if the argument is an string`number`Returns true if the argument is an number`boolean`Returns true if the argument is an "true" boolean, e.g. `TRUE` or `FALSE``defined`Returns true if the argument is defined, e.g. not `undefined``empty`Returns true if the argument is really empty`same`Returns true if two arguments are equal, e.g. `Is.same('1', '1');``associated`Returns true if the argument is an associated array`sequential`Returns true if the argument is an sequential arrayAdditionally the library also provides some basic validation expression filters:

MethodDescription`url`Returns true if the argument contains a URL`email`Returns true if the argument contains an E-Mail`creditcard`Returns true if the argument contains an Credit Card Number`alphanumeric`Returns true if the argument contains an Alpha Numeric string`time`Returns true if the argument contains an time`datestring`Returns true if the argument contains an date string`zip`Returns true if the argument contains an ZIP Code`phone`Returns true if the argument contains a US Phone Number`ssn`Returns true if the argument contains a Social Security Number`affirmative`Returns true if the argument contains True, Yes or Ok`hexadecimal`Returns true if the argument contains a hexadecimal string`hexcolor`Returns true if the argument contains an HTML colorOther Implementations
---------------------

[](#other-implementations)

This library was originally written in JavaScript for Meteor () and implements the same methods and filters.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c851b89ed7f455a631ba82127f6d64b49bf95fb2737c761df1eb5cac00c85610?d=identicon)[flyandi](/maintainers/flyandi)

---

Top Contributors

[![flyandi](https://avatars.githubusercontent.com/u/329973?v=4)](https://github.com/flyandi "flyandi (6 commits)")

### Embed Badge

![Health badge](/badges/flyandi-is/health.svg)

```
[![Health](https://phpackages.com/badges/flyandi-is/health.svg)](https://phpackages.com/packages/flyandi-is)
```

###  Alternatives

[cleaniquecoders/blueprint-macro

Laravel Blueprint Macro

164.6k6](/packages/cleaniquecoders-blueprint-macro)

PHPackages © 2026

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