PHPackages                             ctefan/kiwi - 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. ctefan/kiwi

AbandonedArchivedLibrary

ctefan/kiwi
===========

A PHP implementation of the Cassowary constraint solving algorithm

0.1.0(7y ago)161MITPHPPHP ^7.2

Since Oct 30Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Cmytxy/kiwi-php)[ Packagist](https://packagist.org/packages/ctefan/kiwi)[ RSS](/packages/ctefan-kiwi/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

kiwi-php
========

[](#kiwi-php)

[![Build Status](https://camo.githubusercontent.com/9591fc05c7dfd9bd1024ac359d16b8095cb96edeea87bcdac19fd5cf8066f024/68747470733a2f2f7472617669732d63692e636f6d2f436d797478792f6b6977692d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/Cmytxy/kiwi-php)

[![Build Status](https://camo.githubusercontent.com/5012f710e6cbc0bf08d14e82852f35872a100772437e8b6f856bc078362f56b4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f436d797478792f6b6977692d7068702f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Cmytxy/kiwi-php/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b5bfaa50fd90c76697f7929e43072b6147eaa7fcb5ebe4626496db1df6c5232a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f436d797478792f6b6977692d7068702f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Cmytxy/kiwi-php/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/b96559b12a0dba7d9a1df73ad8422c35056cb5127a8d52bac1cc25760185eb5b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f436d797478792f6b6977692d7068702f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Cmytxy/kiwi-php/?branch=master)

A PHP port of the [Kiwi Java](https://github.com/alexbirkett/kiwi-java) implementation of the Cassowary constraint solving algorithm

Background
----------

[](#background)

This project was created by porting kiwi-java line for line to PHP. Later is was optimized by adopting code from other ports, especially [Kiwi Haxe](https://github.com/Tw1ddle/haxe-kiwi).

It was created to be used in a framework for interactive cli applications.

Example usage
-------------

[](#example-usage)

```
$solver = new Solver();
$x = new Variable('x');
$y = new Variable('y');

// x = 20
$solver->addConstraint(Symbolics::equals($x, 20.0));

// x + 2 = y + 10
$solver->addConstraint(Symbolics::equals(
    Symbolics::add($x, 2.0),
    Symbolics::add($y, 10.0)
));

$solver->updateVariables();

echo sprintf('x = %f.1 | y = %f.1', $x->getValue(), $y->getValue());
// x = 20.0 | y = 12.0
```

Links
-----

[](#links)

- [Kiwi C++](https://github.com/nucleic/kiwi)
- [Kiwi Java](https://github.com/alexbirkett/kiwi-java)
- [Kiwi Haxe](https://github.com/Tw1ddle/haxe-kiwi)
- [overconstrained.io](https://overconstrained.io)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

2748d ago

### Community

---

Top Contributors

[![stefanszymanski](https://avatars.githubusercontent.com/u/2189734?v=4)](https://github.com/stefanszymanski "stefanszymanski (25 commits)")

---

Tags

cassowary

### Embed Badge

![Health badge](/badges/ctefan-kiwi/health.svg)

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

PHPackages © 2026

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