Jyxo\FirePhp::replaceVariable PHP Method

replaceVariable() private static method

Replaces objects with appropriate names in variable.
private static replaceVariable ( mixed $variable ) : mixed
$variable mixed Variable where to replace objects
return mixed
    private static function replaceVariable($variable)
    {
        if (is_object($variable)) {
            return 'object ' . get_class($variable);
        } elseif (is_resource($variable)) {
            return (string) $variable;
        } elseif (is_array($variable)) {
            foreach ($variable as $k => $v) {
                unset($variable[$k]);
                $variable[$k] = self::replaceVariable($v);
            }
            return $variable;
        } else {
            return $variable;
        }
    }