Download the PHP package sanderheijselaar/ezdebug without Composer

On this page you can find all versions of the php package sanderheijselaar/ezdebug. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ezdebug

EZ DEBUG

For easy debugging without x-debug. Works both in the browser aswel as in the terminal.

Installation

Install the composer package (https://packagist.org/packages/sanderheijselaar/ezdebug) or download and include the ezDebug.php file in your project

Quick usage

$data1 = array(
    'id' => 1,
    'name' => 'Sander Heijselaar',
    'country' => 'NL'
);

pr($data1, 'Array dump with pr');

Which will output the following:

As you can see the data is dumped on screen and when you hover on a dump, it will tell you where the location of this dump is. This way you'll never have to search though your code to find all debug lines.

Usage with the Class

The same can be achieved by using the class

use SanderHeijselaar\EzDebug\EzDebug;

$data1 = array(
    'id' => 1,
    'name' => 'Sander Heijselaar',
    'country' => 'NL'
);

EzDebug::pr($data1, 'Array dump with pr');

All methods, except for prdiff & prdiffx will also work on the CLI.

Methods

Below is a list of the available methods that are at your disposal.

For almost every method there's method with the same name with an x behind it. This method will do exactly the same as the method without the x but will also exit at the end of the method.

The same applies for methods that end with an extra d at the end. Those methods do the same thing as the method without the d but will flush the output at the end of the method.

Arguments

Almost every method has the same arguments, for example:

pr($data, $label = '', $bgcolor = '', $color = '')

pr, prd & prx

print the debug data on the screen using print_r

pr($data, $label = '', $bgcolor = '', $color = '')

prv, prvd & prvx

print the debug data on the screen using var_export

prv($data, $label = '', $bgcolor = '', $color = '')

prhe & prhex

print the debug data on the screen using htmlentities

prhe($data, $label = '', $bgcolor = '', $color = '')

prbt & prbtx

print the backtrace on the screen using debug_backtrace()

prbt($format = '', $label = '', $bgcolor = '', $color = '')

The format is eighter EzDebug::BtFormatFull EzDebug::BtFormatCompact. The compact option is default.

prg & prgx

print the $_GET var on the screen

prg($label = '', $bgcolor = '', $color = '')

There's no $data parameter because this method is dedicated to the use the $_GET as the $data. When no $label is provided, '__GET' will be displayed.

prp & prpx

print the $_POST var on the screen

prp($label = '', $bgcolor = '', $color = '')

There's no $data parameter because this method is dedicated to the use the $_POST as the $data. When no $label is provided, '__POST' will be displayed.

prs & prsx

print the $_SESSION var on the screen

prs($label = '', $bgcolor = '', $color = '')

There's no $data parameter because this method is dedicated to the use the $_SESSION as the $data. When no $label is provided, '__SESSION' will be displayed.

prc & prcx

print the $_COOKIE var on the screen

prc($label = '', $bgcolor = '', $color = '')

There's no $data parameter because this method is dedicated to the use the $_COOKIE as the $data. When no $label is provided, '__COOKIE' will be displayed.

prf & prfx

print the $_FILES var on the screen

prf($label = '', $bgcolor = '', $color = '')

There's no $data parameter because this method is dedicated to the use the $_FILES as the $data. When no $label is provided, '__FILES' will be displayed.

prsvr & prsvrx

print the $_SERVER var on the screen

prf($label = '', $bgcolor = '', $color = '')

There's no $data parameter because this method is dedicated to the use the $_SERVER as the $data. When no $label is provided, '__SERVER' will be displayed.

prxml, prxmld & prxmlx

print formatted XML on the screen

prxml(
    "<note><to>Tove</to><from>Jani</from><heading>Reminder</heading><body>Don't forget me this weekend!</body></note>", 
    $label = '', 
    $bgcolor = '', 
    $color = ''
);

prta & prtax

*print the debug data on the screen using a < texta**rea >

prta($data, $label = '', $bgcolor = '', $color = '')

prl, prld & prlx

*print the current l**ine on the screen

prta($data, $label = '', $bgcolor = '', $color = '')

prfile & prfilea

*print the data to a file** instead of the screen. prfile will clear the file before writing the data to it. prfilea will append the dato the bottom of the file.

prfile($filename, $data)

prdiff & prdiffx

prdiff($data1, $data2)

Colors

To distinguish the dumps when you have a screen filled with them, it's possible to pass any background and/or foreground color. My most used colors are:

EzDebug::prd('EzDebug::C' . EzDebug::CLightGreen, 'OK', EzDebug::CLightGreen);
EzDebug::prd('EzDebug::C' . EzDebug::COrange, 'NOTIFICATION', EzDebug::COrange);
EzDebug::prd('EzDebug::C' . EzDebug::CLightCoral, 'ERROR', EzDebug::CLightCoral);

You can use the pre defined colors, but any other color code (#fff or green) will work.

All available colors

There are alot of predefined colors in the class

EzDebug::prcolors();    

Acknowledgements

Licensed under MIT


All versions of ezdebug with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sanderheijselaar/ezdebug contains the following files

Loading the files please wait ...