PHPackages                             devin-clark/console-php - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. devin-clark/console-php

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

devin-clark/console-php
=======================

Console Logging for PHP

19PHP

Since Aug 19Pushed 12y ago1 watchersCompare

[ Source](https://github.com/DevinClark/console-php)[ Packagist](https://packagist.org/packages/devin-clark/console-php)[ RSS](/packages/devin-clark-console-php/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Console.PHP
===========

[](#consolephp)

*A project by Devin Clark*

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

[](#installation)

Using Composer:

```
{
    "require": {
      "devin-clark/console-php": "dev-master"
    }
}

```

Otherwise, just download the class and drop it in somewhere and require it. Pretty simple.

Example
-------

[](#example)

A super minimal example to get started:

```
require("Console-PHP.php");
$errors = new Console_PHP;
$errors->log("This message won't output")->print_errors();

```

As you can see, you can also chain methods to your hearts content.
You probably are familiar with Chrome DevTools but if not, you can read up on it here. [Console API Reference](https://developers.google.com/chrome-developer-tools/docs/console-api)

Available Methods
-----------------

[](#available-methods)

- `->log($message)` - Logs a message to the console.
- `->clear()` - Clears the console.
- `->dir($obj)` - Displays an object in a pretty way.
- `->group("Name")` - Creates a group.
- `->groupCollapsed("Name")` - Creates a collapsed group.
- `->groupEnd()` - Ends the group.
- `->warn($message)` - Logs a warning to the console.
- `->count("Message");` - Shows how many times count is invoked for a specific label.
- `->assert($condition, "Description")` - The first parameter is a condition and if that condition evaluates to false, the assertion fails and a message will be outputted to the console.

### Output Errors

[](#output-errors)

```
echo $test->print_errors();

```

Alternatively, you can do `echo (string)$test;` and get the same result. It's up to you.

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/353563?v=4)[Devin Clark](/maintainers/DevinClark)[@DevinClark](https://github.com/DevinClark)

---

Top Contributors

[![DevinClark](https://avatars.githubusercontent.com/u/353563?v=4)](https://github.com/DevinClark "DevinClark (7 commits)")

### Embed Badge

![Health badge](/badges/devin-clark-console-php/health.svg)

```
[![Health](https://phpackages.com/badges/devin-clark-console-php/health.svg)](https://phpackages.com/packages/devin-clark-console-php)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B11.0k](/packages/psr-log)[open-telemetry/api

API for OpenTelemetry PHP.

1941.5M265](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2328.5M323](/packages/open-telemetry-sdk)[illuminated/console-logger

Logging and Notifications for Laravel Console Commands.

8676.7k](/packages/illuminated-console-logger)

PHPackages © 2026

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