Extract only digit characters from string

/**
 * Extract only digit characters
 * 
 * @param $value
 * @return mixed
 */
function strToDigit($value)
{
	$value = preg_replace('/[^0-9]/', '', $value);
	
	return $value;
}