PHPackages                             ordermind/logic-gates - 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. ordermind/logic-gates

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

ordermind/logic-gates
=====================

Provides classes for logic gates such as AND and OR

1.3.0(5y ago)0338MITPHPPHP ^7.4CI failing

Since Oct 4Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ordermind/logic-gates-php)[ Packagist](https://packagist.org/packages/ordermind/logic-gates)[ RSS](/packages/ordermind-logic-gates/feed)WikiDiscussions master Synced today

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

[![](https://camo.githubusercontent.com/adc5a3165c452150022a7db4edd50718047be711850ab4c9f5588bb5827f97b2/68747470733a2f2f7472617669732d63692e6f72672f6f726465726d696e642f6c6f6769632d67617465732d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ordermind/logic-gates-php)

logic-gates
===========

[](#logic-gates)

This is a generic library that provides logic gates for use by other libraries. It is possible to use the output value of one gate as an input value to another, and thus nesting the gates indefinitely.

Currently supported gates:

- [AND](https://en.wikipedia.org/wiki/AND_gate)
- [NAND](https://en.wikipedia.org/wiki/NAND_gate)
- [OR](https://en.wikipedia.org/wiki/OR_gate)
- [NOR](https://en.wikipedia.org/wiki/NOR_gate)
- [XOR](https://en.wikipedia.org/wiki/XOR_gate)
- [NOT](https://en.wikipedia.org/wiki/NOT_gate)

### Note about the XOR gate

[](#note-about-the-xor-gate)

If the number of input values for the XOR gate is greater than 2, it behaves as a cascade of 2-input gates and performs an odd-parity function. In effect that means that the output of the XOR gate is `true` if the number of `true` input values is odd, otherwise the output is `false`.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

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

2098d ago

### Community

Maintainers

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

---

Tags

collection

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ordermind-logic-gates/health.svg)

```
[![Health](https://phpackages.com/badges/ordermind-logic-gates/health.svg)](https://phpackages.com/packages/ordermind-logic-gates)
```

###  Alternatives

[phpcollection/phpcollection

General-Purpose Collection Library for PHP

1.0k64.7M34](/packages/phpcollection-phpcollection)[aimeos/map

Easy and elegant handling of PHP arrays as array-like collection objects similar to jQuery and Laravel Collections

4.3k459.4k15](/packages/aimeos-map)[league/period

Time range API for PHP

7335.8M24](/packages/league-period)[loophp/collection

A (memory) friendly, easy, lazy and modular collection class.

745762.4k16](/packages/loophp-collection)[athari/yalinqo

YaLinqo, a LINQ-to-objects library for PHP

4581.2M5](/packages/athari-yalinqo)[lorisleiva/lody

Load files and classes as lazy collections in Laravel.

957.9M15](/packages/lorisleiva-lody)

PHPackages © 2026

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