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

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

arg/tagcloud
============

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

91.9k8[1 issues](https://github.com/arogozin/tagcloud/issues)2PHP

Since Jul 11Pushed 11y ago2 watchersCompare

[ Source](https://github.com/arogozin/tagcloud)[ Packagist](https://packagist.org/packages/arg/tagcloud)[ RSS](/packages/arg-tagcloud/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (2)

tagcloud
========

[](#tagcloud)

PHP Tag Cloud composer package Implementation of

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

[](#php-tag-cloud)

v4.0
----

[](#v40)

#### 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

27

—

LowBetter than 47% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.4% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3826633?v=4)[Aleksandr Rogozin](/maintainers/arogozin)[@arogozin](https://github.com/arogozin)

---

Top Contributors

[![arogozin](https://avatars.githubusercontent.com/u/3826633?v=4)](https://github.com/arogozin "arogozin (5 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)")

### Embed Badge

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

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

###  Alternatives

[loilo/lowlight

Show syntax-highlighted code of 150+ languages in your terminal

201.6k1](/packages/loilo-lowlight)

PHPackages © 2026

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