$sanitizer->intSigned() method

Sanitize to signed integer (negative or positive)

Usage

// basic usage
$int = $sanitizer->intSigned(mixed $value);

// usage with all arguments
$int = $sanitizer->intSigned(mixed $value, array $options = []);

Arguments

NameType(s)Description
valuemixed
options (optional)array

Optionally specify any one or more of the following to modify behavior:

  • min (int|null): Minimum allowed value (default=negative PHP_INT_MAX)
  • max (int|null): Maximum allowed value (default=PHP_INT_MAX)
  • blankValue (mixed): Value that you want to use when provided value is null or blank string (default=0)

Return value

int


$sanitizer methods and properties

API reference based on ProcessWire core version 3.0.244

“The end client and designer love the ease at which they can update the website. Training beyond how to log in wasn’t even necessary since ProcessWire’s default interface is straightforward.” —Jonathan Lahijani