This project is not covered by Drupal’s security advisory policy.
Using PHP-ref for debugging, using for example r() instead of devels dpm().
Dependencies
Libraries API and PHP-ref.
Install
Download the PHP-ref library, and place it in the the libraries folder.
Example:
sites/all/libraries/php-ref
Path for phpref.php should in the example be:
sites/all/libraries/php-ref/phpref.php
Usage
Enable Libraries module and Ref debug. Settings are available under admin/config/ref.
But to output the debugging information, you need to add the debugging functions in your code.
Basic usage from php-ref documentation:
Display info about defined classes
r(get_declared_classes());
Display info about global variables
r($GLOBALS)
To print in text mode you can use the rt() function instead:
rt($var);
To terminate the script after the info is dumped, prepend the bitwise NOT operator:
~r($var); // html
~rt($var); // text
Prepending the error control operator (@) will return the information:
$output = @r($var); // html
$output = @rt($var); // text
Keyboard shortcuts (javascript must be enabled):
X - collapses / expands all levels
For more options, see: https://github.com/digitalnature/php-ref
Project information
- caution Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed. - Project categories: Developer tools
- chart icon1 site reports using this module
- Created by misc on , updated
- shield alertThis project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.