PHPackages                             ogbitblt/output - 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. ogbitblt/output

ActiveLibrary

ogbitblt/output
===============

Library for logging text output in popular formats

v1.0.0(3y ago)0101MITPHPPHP ^8.2.0

Since Dec 27Pushed 3y ago1 watchersCompare

[ Source](https://github.com/OGBitBlt/Output)[ Packagist](https://packagist.org/packages/ogbitblt/output)[ RSS](/packages/ogbitblt-output/feed)WikiDiscussions master Synced 1mo ago

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

Output
======

[](#output)

Installation
------------

[](#installation)

You can download the source from github and use it directly in your project, or you can install it using composer with:

```
composer require ogbitblt-output

```

Usage
-----

[](#usage)

Output text to a terminal console

```
use OGBitBlt\Output\Console;
use OGBitBlt\Output\OutputFactory;

// alternatively, you can also
// $console = new Console();
$console = OutputFactory::Create(Console::class);

// clear the terminal
$console->Clear();

// draw a line 80 characters wide using the % character
$console->DrawLn('%',80);

/*
 * You can output text in different colors using the following macros
 * %RED()       -- red
 * %GREEN()     -- green
 * %YELLOW()    -- yellow
 * %BLUE()      -- blue
 * %MAGENTA()   -- magenta
 * %CYAN()      -- cyan
 * %LGRAY()     -- light gray
 * %DGRAY()     -- dark gray
 * %LRED()      -- light red
 * %LGREEN()    -- light green
 * %LYELLOW()   -- light yellow
 * %LBLUE()     -- light blue
 * %LMAGENTA()  -- light magenta
 * %LCYAN()     -- light cyan
 * %WHITE()     -- white
 */

// write a text without a newline character
$console->Write("Hello,");

// write with a newline character
$console->WriteLn("World!");

// change text colors
$console->WriteLn("The american flag is %RED(red), %WHITE(white), and %BLUE(blue)");
```

Output to a file:

```
use OGBitBlt\Output\OutputCompressionType;
use OGBitBlt\Output\OutputEncodingType;
use OGBitBlt\Output\OutputFactory;
use OGBitBlt\Output\TextFile;

// alternatively you can also:
// $outfile = new TextFile("somefile.txt");
$outfile = OutputFactory::Create(TextFile::class,['file' => "somefile.txt"]);
$outfile->Write("string without a newline character");
$outfile->WriteLn("string with a newline character");

// change encoding to base64
$outfile->Write("this is base64 encoded",['encoding' => OutputEncodingType::Base64]);

// gzip output
$outfile->Write("this is gzipped",['compression' => OutputCompressionType::Gzip]);
```

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

1239d ago

### Community

Maintainers

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

---

Top Contributors

[![OGBitBlt](https://avatars.githubusercontent.com/u/113487847?v=4)](https://github.com/OGBitBlt "OGBitBlt (2 commits)")

### Embed Badge

![Health badge](/badges/ogbitblt-output/health.svg)

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

PHPackages © 2026

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