debug_stringify()

Description

Stringify variables for use in the debug log. This is used more as fallback to json_encode() failing to maintain quick
readability of the logs.

Parameters

ColumnTypeDefaultDescription
$value mixed Any value that needs stringified

Return

string

Location

include/debug_functions.php lines 116 to 123

Definition

 
function debug_stringify($value)
{
    if (
is_bool($value)) {
        return 
$value 'true' 'false';
    }

    return 
trim(preg_replace('/\s+/m'' 'print_r($valuetrue)));
}

This article was last updated 14th June 2025 21:35 Europe/London time based on the source file dated 21st January 2025 15:20 Europe/London time.