// Does only allow numbers
function bigintval ($num, $castValue = TRUE, $abortOnMismatch = TRUE) {
//* DEBUG: */ debugOutput('[' . __FUNCTION__ . ':' . __LINE__ . '] ' . 'num=' . $num . ',castValue=' . intval($castValue) . ',abortOnMismatch=' . intval($abortOnMismatch) . ' - ENTERED!');
- // Filter all numbers out
+ // Filter all non-number chars out, so only number chars will remain
$ret = preg_replace('/[^0123456789]/', '', $num);
// Shall we cast?