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. Email us for help if needed.
Installs: 1 174
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
pkg:composer/zaharia/debug
Requires
- php: >=5.3.0
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.