Skip to content

wilon/simple-php-debug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimplePHPDebug

Packagist Packagist Release Packagist Downloads

Simple PHP Debug, better output on browser and write log.

Installation & loading

Just add this line to your composer.json file:

"wilon/simple-php-debug": "^0.1.7"

or

composer require wilon/simple-php-debug

A Simple Example

<?php

$a = 123;
$b = '23333';

simple_dump($a, $b, $_GET, $_SERVER['REMOTE_ADDR']);

simple_log(dirname(__FILE__) . '/somefile.log', $b, $_GET, $_SERVER['REMOTE_ADDR']);

What's better then var_dump on browser?

<?php

$longStr = 'President Trump’s ouster of national security adviser Michael T. Flynn, and the circumstances leading up to it, have quickly become a major crisis for the fledgling administration, forcing the White House on the defensive and precipitating the first significant breach in relations between Trump and an increasingly restive Republican Congress.';
$htmlStr = '<link rel="search" type="application/opensearchdescription+xml" href="/search.osd?v=1483361432" title="Packagist" /><br>';
$array = pathinfo('C:/test/wilon/index.php');

var_dump($longStr, $htmlStr, $array);

simple_dump($longStr, $htmlStr, $array);

image

About

Simple PHP Debug, better output and write log.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages