PHPackages                             sikofitt/is\_class - 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. sikofitt/is\_class

ActiveLibrary

sikofitt/is\_class
==================

Creates a function for is\_class

2.1.1(3mo ago)193GPL-3.0PHPPHP &gt;=8.2CI passing

Since Oct 9Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/sikofitt/is-class)[ Packagist](https://packagist.org/packages/sikofitt/is_class)[ RSS](/packages/sikofitt-is-class/feed)WikiDiscussions 2.1.x Synced 2mo ago

READMEChangelog (3)Dependencies (2)Versions (9)Used By (0)

is-class
========

[](#is-class)

This program simply does one thing.

It creates a function `is_class` to go along with the many other 'is' functions.

`is_object` exists although it will return `true` if you execute `is_object(new \stdClass())` to me that seems like unexpected behavior. When somebody wants to find out if something is a class, they are usually not testing `\stdClass`.

`is_a` exists, but you need to know the name of the class in question. You simply can't call `is_a($class);`.

This function can be called as `is_class($class)`, which will return `true` for `interfaces` or `traits`. The second way is `is_class($class, true)`, where true means strict, which will return `false` if anything is an `interface` or `trait`.

The function always returns false for `\stdClass`, you can use `is_object` for that, unless you extend `\stdClass`.

Tests
-----

[](#tests)

`phpunit`

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance81

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 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 ~486 days

Recently: every ~460 days

Total

8

Last Release

99d ago

Major Versions

v1.0.0.x-dev → 2.0.02021-01-22

PHP version history (4 changes)v1.0.0PHP &gt;=5.4

2.0.0PHP &gt;=7.3

v2.1.0PHP &gt;=7.4

2.1.1PHP &gt;=8.2

### Community

Maintainers

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

---

Top Contributors

[![sikofitt](https://avatars.githubusercontent.com/u/3673285?v=4)](https://github.com/sikofitt "sikofitt (12 commits)")

---

Tags

php

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

PHPackages © 2026

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