PHPackages                             openlss/func-format - 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. openlss/func-format

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

openlss/func-format
===================

Display formatting functions

0.0.8(13y ago)07311LGPL-3.0+PHPPHP &gt;=5.3.2

Since Mar 22Pushed 13y ago1 watchersCompare

[ Source](https://github.com/nullivex/func-format)[ Packagist](https://packagist.org/packages/openlss/func-format)[ Docs](http://openlss.org)[ RSS](/packages/openlss-func-format/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (10)Used By (1)

openlss/func-format
===================

[](#openlssfunc-format)

Usage
-----

[](#usage)

```
//Format bytes into an arbitrary divisor
echo format_bytes(1048576); //1MB

//Create list friendly IP's
echo format_ip('1.2.3.4'); //  1.  2.  3.  4
```

Reference
---------

[](#reference)

### (string) format\_bytes($val,$force=null,$suf='B')

[](#string-format_bytesvalforcenullsufb)

- $val The byte integer to be formatted
- $force Instead of auto-selected a divisor force one
- '' (blank) force bytes
- k force kilobytes
- m force megabytes
- g force gigabytes
- t force terabytes
- p force petabytes
- $suf The suffix to be added example 'B' yields 100MB if blank 100M

### (string) format\_ip($ip='0.0.0.0',$padding='',$web=false)

[](#string-format_ipip0000paddingwebfalse)

- $ip The IP address to be formatted in octect format
- $padding Padding to use between IPs
- $web When TRUE will change spaces to

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90% 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 ~2 days

Total

8

Last Release

4788d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/83c8e9d55e3ebafb0621a441a51af8f551f61a274fde5400459a29cc320b7b75?d=identicon)[nullivex](/maintainers/nullivex)

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

---

Top Contributors

[![nullivex](https://avatars.githubusercontent.com/u/2321375?v=4)](https://github.com/nullivex "nullivex (9 commits)")[![doyjo](https://avatars.githubusercontent.com/u/3947855?v=4)](https://github.com/doyjo "doyjo (1 commits)")

---

Tags

formatbyte formatip format

### Embed Badge

![Health badge](/badges/openlss-func-format/health.svg)

```
[![Health](https://phpackages.com/badges/openlss-func-format/health.svg)](https://phpackages.com/packages/openlss-func-format)
```

###  Alternatives

[willdurand/negotiation

Content Negotiation tools for PHP provided as a standalone library.

1.4k122.0M157](/packages/willdurand-negotiation)[akaunting/laravel-money

Currency formatting and conversion package for Laravel

7825.3M18](/packages/akaunting-laravel-money)[gabrielelana/byte-units

Library to parse, format and convert byte units

1672.2M19](/packages/gabrielelana-byte-units)[gajus/dindent

HTML indentation library for development and testing.

1781.9M50](/packages/gajus-dindent)[consistence/consistence

Consistence - consistent approach and additions to PHP's functionality

1831.1M18](/packages/consistence-consistence)[kartik-v/yii2-datecontrol

Date control module allowing separation of formats for View and Model for Yii Framework 2.0

551.5M36](/packages/kartik-v-yii2-datecontrol)

PHPackages © 2026

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