mini\sqlval() function

Documentation

Convert a value to SQL-bindable scalar

Uses the 'sql-value' converter target type. Returns the value unchanged if it's already a scalar or null.

Signature

function sqlval(mixed $value): string|int|float|bool|null

Parameters

NameTypeDefault
$value mixed required

Returns

string|int|float|bool|null

Source

src/Database/functions.php:174-189