PHPackages                             reestyle-it/examiner - 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. reestyle-it/examiner

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

reestyle-it/examiner
====================

Lets you examine variables or classes and perform actions based on type

v0.2-rc1(2y ago)00GPL-3.0-onlyPHPPHP ^8.1

Since Sep 11Pushed 2y ago1 watchersCompare

[ Source](https://github.com/reestyle-it/examiner)[ Packagist](https://packagist.org/packages/reestyle-it/examiner)[ RSS](/packages/reestyle-it-examiner/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Examiner
========

[](#examiner)

Let's you quickly examine, or rather evaluate, objects and/or datatypes. Depends primarily on basic functions and Reflection classes to ensure speedy evaluations.

Please remember that, when working with objects, you should only be able to check for PUBLIC members. Trying to access private or protected members from outside an object (except inherited) is pointless.

Programming use cases
---------------------

[](#programming-use-cases)

Examine if the provided `thing` is of given type and then call the argument given. If it's not of given type, either null will be returned or the given closure will be executed.

Examples:

When
----

[](#when)

```
$bool = true;
examine($bool)->whenBoolean(
    fn () => true,   // True block
    fn () => false   // False block
);

```

Objects
-------

[](#objects)

```
$var = new SomeObject();
examine($var)->instanceOf(AbstractObject);
examine($var)->hasTrait(AbstractObject);
examine($var)->hasMethod('objectMethod');
examine($var)->hasProperty('objectProperty');

```

Datatypes
---------

[](#datatypes)

### Booleans

[](#booleans)

```
$bool = true;
examine($bool)->isTrue(); // true
examine($bool)->isFalse(); // false (duh)
examine($bool)->isEmpty(); // MethodNotFoundException
examine($bool)->ignoreType()->isEmpty(); // null

```

### Strings

[](#strings)

```
examine(' ')->couldBeTrue(); // true
examine('')->couldBeTrue(); // false
examine(0)->couldBeTrue(); // false
examine(0)->couldBeFalse(); // true
examine(' ')->isEmpty(); // false
examine('')->isEmpty(); // true
examine(null)->isEmpty(); // MethodNotFoundException
examine(0)->couldBeTrue(); // false
examine(0)->couldBeFalse(); // true

```

### Integers &amp; floats

[](#integers--floats)

```
examine(1)->isInt(); // true
examine(1)->isFloat(); // false
examine(1.0)->isFloat(); // true
examine(1.0)->isInt(); // false
examine(1)->isTrue(); // false
examine(1)->couldBeTrue(); // true

examine(1.0)->whenFloat(fn () => 13.45);

```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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

Every ~162 days

Total

2

Last Release

817d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/86612611192659fa69deddc8509eb774edd662a8b32b79ee6fd780b6c5a5262a?d=identicon)[reestyle-it](/maintainers/reestyle-it)

---

Top Contributors

[![reestyle-it](https://avatars.githubusercontent.com/u/1517435?v=4)](https://github.com/reestyle-it "reestyle-it (12 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/reestyle-it-examiner/health.svg)

```
[![Health](https://phpackages.com/badges/reestyle-it-examiner/health.svg)](https://phpackages.com/packages/reestyle-it-examiner)
```

###  Alternatives

[foolz/foolfuuka

The FoolFuuka Imageboard

2191.8k](/packages/foolz-foolfuuka)

PHPackages © 2026

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