PHPackages                             hpolthof/tagcloud - 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. hpolthof/tagcloud

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

hpolthof/tagcloud
=================

PHP Tag Cloud composer package Implementation of http://lotsofcode.github.io/tag-cloud/

v4.0.2(10y ago)4169MITPHPPHP &gt;=5.4.0

Since Jul 7Pushed 10y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

tagcloud
========

[](#tagcloud)

PHP Tag Cloud composer package Implementation of

PHP Tag Cloud
=============

[](#php-tag-cloud)

v4.0
----

[](#v40)

#### Installation

[](#installation)

Use composer

```
composer require hpolthof/tagcloud

```

#### Basic usage

[](#basic-usage)

```
$cloud = new TagCloud();
$cloud->addTag("tag-cloud");
$cloud->addTag("programming");
echo $cloud->render();

```

#### Convert a string

[](#convert-a-string)

```
$cloud->addString("This is a tag-cloud script, written by Del Harvey. I wrote this tag-cloud class because I just love writing code.");

```

#### Adding multiple tags

[](#adding-multiple-tags)

```
$cloud->addTags(array('tag-cloud','php','github'));

```

#### Removing a tag

[](#removing-a-tag)

```
$cloud->setRemoveTag('github');

```

#### Removing multiple tags

[](#removing-multiple-tags)

```
$cloud->setRemoveTags(array('del','harvey'));

```

#### More complex adding

[](#more-complex-adding)

```
$cloud->addTag(array('tag' => 'php', 'url' => 'http://www.php.net', 'colour' => 1));
$cloud->addTag(array('tag' => 'ajax', 'url' => 'http://www.php.net', 'colour' => 2));
$cloud->addTag(array('tag' => 'css', 'url' => 'http://www.php.net', 'colour' => 3));

```

#### Set the minimum length required

[](#set-the-minimum-length-required)

```
$cloud->setMinLength(3);

```

#### Limiting the output

[](#limiting-the-output)

```
$cloud->setLimit(10);

```

#### Set the order

[](#set-the-order)

```
$cloud->setOrder('colour','DESC');

```

#### Set a custom HTML output

[](#set-a-custom-html-output)

```
$cloud->setHtmlizeTagFunction( function($tag, $size) {
	$link = ''.$tag['tag'].'';
	return "{$link} ";
});

```

#### Outputting the cloud (shown above)

[](#outputting-the-cloud-shown-above)

```
echo $cloud->render();

```

More usages on in a prettier format can be found here:

Tests
-----

[](#tests)

To run the unit test suite:

```
cd tests
curl -s https://getcomposer.org/installer | php
php composer.phar install
./vendor/bin/phpunit lotsofcode/TagCloud/TagCloud.php

```

Submitting pull requests
------------------------

[](#submitting-pull-requests)

Indentation style, size and encoding should be followed as per .editorconfig settings.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

3968d ago

### Community

Maintainers

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

---

Top Contributors

[![arogozin](https://avatars.githubusercontent.com/u/3826633?v=4)](https://github.com/arogozin "arogozin (5 commits)")[![hpolthof](https://avatars.githubusercontent.com/u/1415623?v=4)](https://github.com/hpolthof "hpolthof (4 commits)")[![hboers](https://avatars.githubusercontent.com/u/38400?v=4)](https://github.com/hboers "hboers (3 commits)")[![DouglasMedeiros](https://avatars.githubusercontent.com/u/229050?v=4)](https://github.com/DouglasMedeiros "DouglasMedeiros (1 commits)")[![jaltek](https://avatars.githubusercontent.com/u/359552?v=4)](https://github.com/jaltek "jaltek (1 commits)")

---

Tags

laraveltagtag cloudkeywordskeyword cloud

### Embed Badge

![Health badge](/badges/hpolthof-tagcloud/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[nedwors/navigator

A Laravel package to ease defining navigation menus

433.1k](/packages/nedwors-navigator)[dcblogdev/laravel-junie

Install pre-configured guides for Jetbrains Junie

392.5k](/packages/dcblogdev-laravel-junie)

PHPackages © 2026

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