PHPackages                             dg/php54-arrays - 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. dg/php54-arrays

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

dg/php54-arrays
===============

Command-line script to convert between array() and PHP 5.4's short syntax \[\]

v3(11y ago)462344BSD-3-ClausePHPPHP &gt;=5.4.0

Since Aug 14Pushed 8y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (4)Used By (0)

PHP 5.4 Short Arrays Converter \[\]
===================================

[](#php-54-short-arrays-converter-)

Command-line script to convert between `array()` and PHP 5.4's short syntax `[]` (and vice versa).

It uses native PHP tokenizer, so conversion is safe. The script was successfully tested against thousands of PHP files.

Usage
-----

[](#usage)

To convert all `*.php` and `*.phpt` files in whole directory recursively or to convert a single file use:

```
php convert.php

```

To convert source code from STDIN and print the output to STDOUT use:

```
php convert.php < input.php > output.php

```

To convert short syntax `[]` to older long syntax `array()` use option `--reverse`:

```
php convert.php --reverse

```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Total

3

Last Release

4055d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/17f266513a3ca97500ec3d85d562b9279c7a6346358fe2b8d90390ece717a027?d=identicon)[david@grudl.com](/maintainers/david@grudl.com)

---

Top Contributors

[![dg](https://avatars.githubusercontent.com/u/194960?v=4)](https://github.com/dg "dg (8 commits)")

---

Tags

converterphp

### Embed Badge

![Health badge](/badges/dg-php54-arrays/health.svg)

```
[![Health](https://phpackages.com/badges/dg-php54-arrays/health.svg)](https://phpackages.com/packages/dg-php54-arrays)
```

###  Alternatives

[ecomdev/sync-magento-2-migration

Migration Application for M1 -&gt; M2

591.6k](/packages/ecomdev-sync-magento-2-migration)[claroline/scorm-bundle

Claroline scorm plugin

141.8k](/packages/claroline-scorm-bundle)[tastaturberuf/anystores

Location management and geographic search

121.7k](/packages/tastaturberuf-anystores)

PHPackages © 2026

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