zaharia/debug

A list of useful shortcut-function for debugging

This package's canonical repository appears to be gone and the package has been frozen as a result.

1.0.1 2013-11-08 14:40 UTC

This package is not auto-updated.

Last update: 2021-01-03 22:23:03 UTC


README

#Debug functions package

The package contains a list of useful shortcut-function for low-level debugging/

##Functions

1. pre() function outputs the print_r() result for given arguments wrapping it in <pre> tag. For instance:

$var = array('a', array('b'));
pre($var);
<pre>
Array
(
    [0] => a
    [1] => Array
        (
            [0] => b
        )

)
</pre>

Example 2:

$var1 = new \stdClass();
$var2 = 'test';
pre($var1, $var2);
<pre>
stdClass Object
(
)
test<br />
</pre>

2. pred() function does exactly the same actions and after outputing the result it runs die() function.