PHPackages                             frankforte/quantumphp - 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. frankforte/quantumphp

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

frankforte/quantumphp
=====================

Add server side logs directly to the JavaScript console in various browsers like Firefox Quantum, without the requirement of a browser extension or add-on. A FirePHP and ChromePHP alternative for modern browsers

1.2.5(1y ago)224.8k51Apache-2.0PHPPHP &gt;=7.3 &lt;9.0

Since Nov 17Pushed 1y ago7 watchersCompare

[ Source](https://github.com/frankforte/quantumphp)[ Packagist](https://packagist.org/packages/frankforte/quantumphp)[ RSS](/packages/frankforte-quantumphp/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (27)Used By (1)

Overview
--------

[](#overview)

QuantumPHP is a PHP and JavaScript library that can log server side variables directly to the developer tools console in various browsers like Firefox Quantum, with or without the use of a browser extension or add-on.

Requirements
------------

[](#requirements)

- PHP 7.3 or later

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

[](#installation)

### 1. Add QuantumPHP to your project

[](#1-add-quantumphp-to-your-project)

a) `composer require frankforte/quantumphp`

or

b) `git clone https://github.com/frankforte/quantumphp.git vendor/frankforte/quantumphp`

### 2. Get QuamtumPHP in your browser:

[](#2-get-quamtumphp-in-your-browser)

#### a) For Firefox, add the following light weight add-on:

[](#a-for-firefox-add-the-following-light-weight-add-on)

or

#### b) For Google Chrome, install the Chrome extension:

[](#b-for-google-chrome-install-the-chrome-extension)

More information can be found here:

NOTE: Do not forget to turn on Chrome Logger for each website that you debug. There is a little icon that looks like a console window near the top right, just beside the address bar.

or

#### c) copy the JavaScript file into your public directory and include it in your HTML.

[](#c-copy-the-javascript-file-into-your-public-directory-and-include-it-in-your-html)

for example:

```
cp vendor/frankforte/quantumphp/src/QuantumPHP.js public_html/js/QuantumPHP.js

```

Then add the file to the HTML template

```

```

### 3. Use it in your project:

[](#3-use-it-in-your-project)

#### Laravel Monolog

[](#laravel-monolog)

Make the class available to your namespace:

```
use Monolog\Logger;
use FrankForte\QuantumPHP\QuantumPHPHandler;

```

Use the logger

```
$logger = new Logger('my_logger');
$logger->pushHandler(new QuantumPHPHandler());

$test_data = ['foo'=>'bar'];
$logger->addInfo('Log Message', $test_data);
$logger->warning('Some warning');
$logger->critical('Someething Bad');
$logger->table([
	['one'=>'a', 'two'=>'b', 'three'=>'c'],
	['one'=>'aa','two'=>'bb','three'=>'cc']
]);

```

#### Without Monolog or in other PHP projects or frameworks

[](#without-monolog-or-in-other-php-projects-or-frameworks)

Add this to your PHP file. The 'add' method will add rich information to the logs in a table format. Note: objects and arrays should be logged with the "add" method: `QuantumPHP::add($object);`

```
