console.log for php
Install via the composer
utility.
composer require "kingzcheung/console-php"
or add the following lines to your composer.json
:
{
"require": {
"kingzcheung/console-php":"~0.0.2"
}
}
include "vendor/autoload.php";
use kingzcheung\Console;
$data1 = "This is a test";
$data2 = [[1,2,3,['a'=>true]]];
Console::log($data1);
Console::log($data1,$data2);
Console::json($data2);
Console::table($data2);
Open your browser -> F12(Mac:cmd+option+i) -> You will see the following printout