Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php /* tools/dump.php - only usable by Super User */
- defined('C5_EXECUTE') or die(_('Access Denied.'));
- $u = new User();
- if(!$u->isSuperUser()) { die(_('Access Denied.')); }
- function dump($val, $title='') {
- echo '<pre>'. ($title ? '<strong>'. $title. '</strong>: ' : ''). print_r($val, 1). '</pre>';
- }
- function dump_methods($obj, $title='') {
- if(is_object($obj)) {
- $reflect = new ReflectionClass($obj);
- $methods = $reflect->getMethods();
- dump($methods, $title);
- }
- }
- /**
- * Called like this:
- include 'tools/dump.php';
- dump($survey, '$survey Object';
- dump_methods($survey, '$survey Methods');
- */
- ?>
Add Comment
Please, Sign In to add comment