camspiers/json-pretty
Pretty-print JSON in PHP 5.3. camspiers/json-pretty provides a simple JsonPretty class with a prettify() method to format arrays/JSON into readable, indented output. Install via Composer and use in a few lines.
This project provides pretty printing for json in php 5.3.
Make sure the following is present in your composer.json file:
{
"require": {
"camspiers/json-pretty": "1.0.*"
}
}
Then run:
$ composer update
$jsonPretty = new Camspiers\JsonPretty\JsonPretty;
echo $jsonPretty->prettify(array('test' => 'test'));
To run the unit tests with phpunit installed globally:
$ phpunit
To run the unit tests with phpunit installed via composer install --dev:
$ vendor/bin/phpunit
How can I help you explore Laravel packages today?