function kprint_r

Returns a message using Krumo.

Uses dprint_r() as a fallback.

Parameters

mixed $input: The thing to print.

boolean $return: (optional) Indicates if the output should be returned. The default is FALSE.

string $name: (optional) The label to apply.

string $function: (optional) The function to use for output in the case where dprint_r() is used. The defualt is print_r().

Return value

The output if $return is TRUE.

8 calls to kprint_r()
ddebug_backtrace in ./devel.module
Prints the function call stack.
devel_entity_info_page in ./devel.pages.inc
Page callback: Returns information from hook_entity_info().
devel_field_info_page in ./devel.pages.inc
Page callback: Returns information about fields.
devel_render in ./devel.module
Prints a renderable array element to the screen using kprint_r().
devel_session in ./devel.pages.inc
Page callback: Displays the session.

... See full list

File

./devel.module, line 2047

Code

function kprint_r($input, $return = FALSE, $name = NULL, $function = 'print_r') {
    // We do not want to krumo() strings and integers and such.
    if (merits_krumo($input)) {
        if (user_access('access devel information')) {
            return $return ? (isset($name) ? $name . ' => ' : '') . krumo_ob($input) : krumo($input);
        }
    }
    else {
        return dprint_r($input, $return, $name, $function);
    }
}