PHPackages                             soatok/left-pad - 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. soatok/left-pad

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

soatok/left-pad
===============

Left pad a string to a fixed length

v1.0.0(10y ago)6193[1 issues](https://github.com/soatok/left-pad/issues)MITPHPPHP ^5.3|^7.0

Since Apr 8Pushed 10y ago2 watchersCompare

[ Source](https://github.com/soatok/left-pad)[ Packagist](https://packagist.org/packages/soatok/left-pad)[ RSS](/packages/soatok-left-pad/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

left-pad
========

[](#left-pad)

[![Build Status](https://camo.githubusercontent.com/1d008885d65606a4d076cdd60d47172e8b6e7ab57d55a4683d9170939ece7824/68747470733a2f2f7472617669732d63692e6f72672f736f61746f6b2f6c6566742d7061642e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/soatok/left-pad)

Left pad a string.

Usage
-----

[](#usage)

```
var_dump(left_pad('foo', 5));
# string(5) "  foo"
```

(By [@SoatokDhole](https://twitter.com/SoatokDhole))

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

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

3688d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/62964206396b67fb3a8985b19dc274f74b1a9232374e189577c0f1388fdc73f2?d=identicon)[soatok](/maintainers/soatok)

---

Top Contributors

[![soatok](https://avatars.githubusercontent.com/u/8157726?v=4)](https://github.com/soatok "soatok (17 commits)")[![NicolasCharpentier](https://avatars.githubusercontent.com/u/9944995?v=4)](https://github.com/NicolasCharpentier "NicolasCharpentier (2 commits)")[![fanalin](https://avatars.githubusercontent.com/u/2435068?v=4)](https://github.com/fanalin "fanalin (1 commits)")[![lord2800](https://avatars.githubusercontent.com/u/715922?v=4)](https://github.com/lord2800 "lord2800 (1 commits)")

### Embed Badge

![Health badge](/badges/soatok-left-pad/health.svg)

```
[![Health](https://phpackages.com/badges/soatok-left-pad/health.svg)](https://phpackages.com/packages/soatok-left-pad)
```

###  Alternatives

[magepal/magento2-preview-checkout-success-page

Quickly and easily preview and test your Magento2 checkout success page, without placing a new order each time

7790.6k](/packages/magepal-magento2-preview-checkout-success-page)[jeremeamia/iter8

4912.4k](/packages/jeremeamia-iter8)

PHPackages © 2026

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