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)452354BSD-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 today

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

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

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

4100d 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

[tempest/highlight

Fast, extensible, server-side code highlighting

697964.9k95](/packages/tempest-highlight)[ichhabrecht/content-defender

Define allowed or denied content element types in your backend layouts

923.2M27](/packages/ichhabrecht-content-defender)[mageplaza/magento-2-seo-extension

Magento 2 SEO extension

139534.2k2](/packages/mageplaza-magento-2-seo-extension)[swiftmade/statamic-clear-assets

Deletes unused assets. Saves storage space.

1947.1k](/packages/swiftmade-statamic-clear-assets)[refinery29/league-lazy-event

Provides a LazyListener for use with league/event which allows for lazy fetching of actual listeners.

1423.3k](/packages/refinery29-league-lazy-event)

PHPackages © 2026

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