Sanitize value to string

Note that this makes no assumptions about what is a "safe" string, so you should always apply another sanitizer to it.

Usage

// basic usage
$string = $sanitizer->string($value);

// usage with all arguments
$string = $sanitizer->string($value, $sanitizer = null);

Arguments

NameType(s)Description
$valuestring or int or array or object or bool or float

Value to sanitize as string

$sanitizer (optional)

Return value

string


$sanitizer methods and properties

API reference based on ProcessWire core version 3.0.97